Don't use isspace() in OBJ file parser.

pull/316/head
Tyson Grant Nottingham 2014-07-22 21:59:23 -07:00
parent 79c56adea4
commit 0c5605d07d
1 changed files with 4 additions and 9 deletions

View File

@ -233,17 +233,12 @@ void ObjFileParser::copyNextLine(char *pBuffer, size_t length)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
void ObjFileParser::getVector( std::vector<aiVector3D> &point3d_array ) { void ObjFileParser::getVector( std::vector<aiVector3D> &point3d_array ) {
size_t numComponents( 0 ); size_t numComponents( 0 );
DataArrayIt tmp( m_DataIt ); const char* tmp( &m_DataIt[0] );
while( true ) { while( !IsLineEnd( *tmp ) ) {
while( isspace(*tmp) && !IsLineEnd(*tmp) ) { if ( !SkipSpaces( &tmp ) ) {
tmp++;
}
if( IsLineEnd(*tmp) ) {
break; break;
} }
while( !isspace(*tmp) ) { SkipToken( tmp );
tmp++;
}
++numComponents; ++numComponents;
} }
float x, y, z; float x, y, z;