diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index b14807a11..3ff24faac 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -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(); diff --git a/polymer/eduke32/source/m32def.c b/polymer/eduke32/source/m32def.c index 42cfe2fee..a0cc49ff4 100644 --- a/polymer/eduke32/source/m32def.c +++ b/polymer/eduke32/source/m32def.c @@ -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 {