lua-users home
lua-l archive

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


On Fri, Apr 15, 2011 at 7:28 PM,  <jgiors@threeeyessoftware.com> wrote:
> Point of note: The string.format code includes a cast from the floating
> point format to the integer format (i.e. it's not just a detail of
> sprintf).

to be specific:  on %i, it uses luaL_checkint(), which casts from
lua_Integer to int.  since sprintf()'s %i assumes an int, to change it
to a long, or long long would mean inserting one or two 'l's on the
pattern before calling sprintf()

so it _is_ a detail of sprintf, because %i requires an int.

of course, the easiest solution is to just compile with a 64-bit int :-)

-- 
Javier