lua-users home
lua-l archive

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

I am relatively new to Lua, so please bear with me.

On Lua 5.2:
> io.write(string.format("%d\n", tonumber("5c7d528b825b090", 16)));

On Lua 5.3:
>  io.write(string.format("%d\n", tonumber("5c7d528b825b090", 16)));

The latter is the correct answer.

(1) Am I doing something wrong in Lua 5.2. I am relatively new to Lua, and did not see an explicit mention of this being  fixed in 5.3 , so, I am not sure if there is an actual bug in 5.2.
(2) For some reason, I can't upgrade to 5.3 (due to policies outside my control). Is there a workaround to get the right answer in 5.2?