Aul: fix octal escape parsing

Bet you didn't know C4Script supported octal escapes inside strings.
Well, it didn't; or at least not correctly.
directional-lights
Nicolas Hake 2016-10-20 16:53:23 +02:00
parent 5915f79960
commit 118961d0b7
1 changed files with 2 additions and 2 deletions

View File

@ -476,10 +476,10 @@ C4AulTokenType C4AulParse::GetNextToken()
{
// Octal escape: \142
char ch = 0;
while (SPos[1] >= '0' && SPos[1] <= '7')
while (SPos[0] >= '0' && SPos[0] <= '7')
{
ch *= 8;
ch += *++SPos -'0';
ch += *SPos++ -'0';
}
strbuf.push_back(ch);
break;