OBJParser: Support spaces in texture file names

This patch allows embedded spaces in texture filenames found in MTL files. It only affects the OBJ parser.

Submitted by: Nola Donato nola.donato@samsung.com
pull/1161/head
nola.donato@samsung.com 2017-01-30 20:27:35 -08:00
parent a046268a67
commit df5fc5f68d
1 changed files with 2 additions and 4 deletions

View File

@ -140,15 +140,13 @@ inline char_t getName( char_t it, char_t end, std::string &name )
}
char *pStart = &( *it );
while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it ) && !IsSpaceOrNewLine( *it ) ) {
while( !isEndOfBuffer( it, end ) && !IsLineEnd( *it )) {
++it;
}
/*while( isEndOfBuffer( it, end ) || IsLineEnd( *it ) || IsSpaceOrNewLine( *it ) ) {
while(IsSpace( *it ) ) {
--it;
}
++it;
*/
// Get name
// if there is no name, and the previous char is a separator, come back to start
while (&(*it) < pStart) {