[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 string formatting check fails when using integers
- From: Doug Currie <doug.currie@...>
- Date: Fri, 13 Apr 2012 15:42:53 -0400
On Apr 13, 2012, at 3:11 PM, Roberto Ierusalimschy wrote:
>> How about
>>
>> luaL_argcheck(L, 0 <= n && n <= (unsigned LUA_INTFRM_T)(MAX_UINTFRM), arg,
>
> Did you test it?
Shamefully…
> return string.format("%x",2^64-1025)
fffffffffffff800
> return string.format("%x",2^64-1024)
0
>
I was sidetracked by the 2^64 argument; it's a resolution of doubles issue, not an off by one problem.
Sorry!
e