Defs: Fix the parser so tokens with 'x' or 'X' as a second character are only treated as hex constants when the first character is '0'. Introduced in r5822.

git-svn-id: https://svn.eduke32.com/eduke32@5907 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-10-23 19:47:29 +00:00
parent 94f615cc52
commit e24941f0c7

View file

@ -351,7 +351,7 @@ int32_t scriptfile_getsymbolvalue(char const *name, int32_t *val)
{
if (Bstrlen(name) > 2)
{
if (tolower(name[1]) == 'x') // hex constants
if (name[0] == '0' && tolower(name[1]) == 'x') // hex constants
{
int64_t x;
sscanf(name + 2, "%" PRIx64 "", &x);