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; > }