Corrected small bug in the tokenizer (it would add a fake token for lines ending with a space before /n)
This commit is contained in:
parent
96d8ae7ec0
commit
b5553ec6ca
|
@ -19,6 +19,12 @@
|
|||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
|
||||
* for more details. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
History
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __VCGLIB_IMPORT_OFF
|
||||
|
@ -285,11 +291,14 @@ namespace vcg
|
|||
{
|
||||
while (line[from]==' ' && from!=length)
|
||||
from++;
|
||||
to = from+1;
|
||||
while (line[to]!=' ' && to!=length)
|
||||
to++;
|
||||
tokens.push_back(line.substr(from, to-from).c_str());
|
||||
from = to;
|
||||
if(from!=length)
|
||||
{
|
||||
to = from+1;
|
||||
while (line[to]!=' ' && to!=length)
|
||||
to++;
|
||||
tokens.push_back(line.substr(from, to-from).c_str());
|
||||
from = to;
|
||||
}
|
||||
}
|
||||
while (from<length);
|
||||
} // end Tokenize
|
||||
|
|
Loading…
Reference in New Issue