|
return tonumber('-0x12345678')
There is certainly some inconsistency there, and perhaps the Lua code should detect the leading "-" sign, if it is going to do the hex conversion itself.
I ran into this some time ago in testing my 32bit implementation of Lua for the ARM7. Lua does not handle a leading - in number conversions, it's a unary minus operator as far as the parser is concerned. Ralph