Reorganize string parsing in CBotToken::NextToken to fix #212

dev-ui
adiblol 2013-05-26 18:40:25 +02:00
parent 8f6fd2a131
commit cc2e192f0d
1 changed files with 2 additions and 4 deletions

View File

@ -248,17 +248,15 @@ CBotToken* CBotToken::NextToken(char* &program, int& error, bool first)
{
while (c != 0 && !CharInList(c, nch))
{
mot += c;
c = *(program++); // next character
if ( c == '\\' )
{
c = *(program++); // next character
if ( c == 'n' ) c = '\n';
if ( c == 'r' ) c = '\r';
if ( c == 't' ) c = '\t';
mot += c;
c = *(program++); // next character
}
mot += c;
c = *(program++);
}
if ( c == '\"' )
{