lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


the lexical parser continues to read hex values, ignoring that the value may be overflowing the maximum integer
e.g. on 64 bit lua (5.3 and 5.4-alpha have the same issue)
> 0x7FFFFFFFFFFFFFFF
9223372036854775807
> 0xFFFFFFFFFFFFFFFF
-1
> 0xFFFFFFFFFFFFFFFFF
-1
> 0x10000000000000000
0
> 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
-1

expected:
the l_str2int should fail and the lexical parser should fall back to floats