Scriptparser: Fix crash on C4ID starting with a number

The C4ID syntax removal was not thorough enough: The tokenizer did
nothing in the C4ID state anymore except traversing the string, but not all
instances of reaching that state were removed. As a result, the tokenizer
read past the script end.
stable-5.1
Günther Brammer 2010-03-05 00:26:29 +01:00
parent 4859f84eff
commit e09b3b02b3
1 changed files with 0 additions and 7 deletions

View File

@ -568,7 +568,6 @@ C4AulTokenType C4AulParseState::GetNextToken(char *pToken, long int *pInt, HoldS
TGS_Ident, // getting identifier
TGS_Int, // getting integer
TGS_IntHex, // getting hexadecimal integer
TGS_C4ID, // getting C4ID
TGS_String, // getting string
TGS_Dir // getting directive
};
@ -719,12 +718,6 @@ C4AulTokenType C4AulParseState::GetNextToken(char *pToken, long int *pInt, HoldS
State = TGS_IntHex;
break;
}
// some strange C4ID?
if (((C >= 'A') && (C <= 'Z')) || (C == '_'))
{
State = TGS_C4ID;
break;
}
// parse as decimal int
base = 10;
}