- fixed crash caused by the wrong order in the && boolean conditions. It's incredible that the importer has never crashed before today....

This commit is contained in:
granzuglia 2013-03-25 18:00:34 +00:00
parent fce6ab1138
commit 099a18f47c
1 changed files with 2 additions and 2 deletions

View File

@ -571,12 +571,12 @@ namespace vcg
tokens.clear();
do
{
while ( (line[from]==' ' || line[from] == '\t' || line[from] == '\r') && from!=length)
while (from!=length && (line[from]==' ' || line[from] == '\t' || line[from] == '\r'))
from++;
if(from!=length)
{
to = from+1;
while ( (((line[to]!=' ') && (line[to] != '\t')) || (line[to] == '\r')) && to!=length)
while ( to!=length && (((line[to]!=' ') && (line[to] != '\t')) || (line[to] == '\r')))
to++;
tokens.push_back(line.substr(from, to-from).c_str());
from = to;