lua-users home
lua-l archive

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


On Thu, May 9, 2019 at 7:59 PM Egor Skriptunoff wrote:
On Thu, May 9, 2019 at 7:43 PM Dirk Laurie wrote:

It's a ten-line patch to lvm.c:
534a535,544
>     case LUA_TNUMINT: {
>       lua_Integer n=ivalue(rb);
>       setivalue(ra,n<0?-n:n);
>       return;
>     }

Ten lines are not enough. 
What result would you expect for INT_MIN ?

BTW, math.abs(1<<63) in both Lua 5.3 and 5.4 returns negative value.  That's a bug.