C-CON and M32script: Only accept hex literals beginning with '0' and not any other digit.

git-svn-id: https://svn.eduke32.com/eduke32@5908 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-10-23 19:47:33 +00:00
parent e24941f0c7
commit 95452a5a8a
2 changed files with 2 additions and 2 deletions

View file

@ -2057,7 +2057,7 @@ static int32_t C_GetNextValue(int32_t type)
BITPTR_CLEAR(g_scriptPtr-apScript);
if (tolower(textptr[1])=='x')
if (textptr[0] == '0' && tolower(textptr[1])=='x')
*g_scriptPtr = parse_hex_constant(textptr+2);
else
*g_scriptPtr = parse_decimal_number();

View file

@ -943,7 +943,7 @@ static int32_t GetGamearrayID(const char *szGameLabel, int32_t searchlocals)
static int32_t parse_integer_literal(int32_t *num)
{
if (tolower(textptr[1])=='x')
if (textptr[0] == '0' && tolower(textptr[1])=='x')
sscanf(textptr+2, "%" SCNx32, num);
else
{