On Thu, Aug 14, 2014 at 2:32 AM, Ondřej Nešpor <
ondrej...@gmail.com> wrote:
> Is it a bug in the struct library or does it by "long" mean something else
> than I do (64bit signed integer)? :)
It's a limitation of Lua, the only number type it handles is IEEE
double (64-bit float). the struct library does pack 'long' fields as
64-bit integers, but when passed as a Lua value they're casted through
a double.
as you have found out, a double has integer precision only up to 2^53.
--
Javier