better check of emtpy line skipping in obj parsing

This commit is contained in:
Paolo Cignoni 2012-10-31 21:03:05 +00:00
parent b6d198362c
commit 4dbbb9384a
1 changed files with 2 additions and 2 deletions

View File

@ -643,9 +643,9 @@ public:
}
}
}
while (( line.length()==0 || line[0] == '#') && !stream.eof()); // skip comments and empty lines
while (( line.empty() || (!line.empty() && line[0] == '#')) && !stream.eof()); // skip comments and empty lines
if ( (line.length() == 0)||(line[0] == '#') ) // can be true only on last line of file
if ( (line.length() == 0)||(!line.empty() && line[0] == '#') ) // can be true only on last line of file
return;
size_t from = 0;