From e09b3b02b39e12bba323af1236e17d156c9e7176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Fri, 5 Mar 2010 00:26:29 +0100 Subject: [PATCH] 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. --- src/script/C4AulParse.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/script/C4AulParse.cpp b/src/script/C4AulParse.cpp index b7cea21fa..47c2a0ac3 100644 --- a/src/script/C4AulParse.cpp +++ b/src/script/C4AulParse.cpp @@ -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; }