diff options
Diffstat (limited to 'src/lj_carith.c')
-rw-r--r-- | src/lj_carith.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_carith.c b/src/lj_carith.c index 462dbae4..231d7a8a 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c @@ -205,7 +205,7 @@ static int carith_int64(lua_State *L, CTState *cts, CDArith *ca, MMS mm) else *up = lj_carith_powu64(u0, u1); break; - case MM_unm: *up = (uint64_t)-(int64_t)u0; break; + case MM_unm: *up = ~u0+1u; break; default: lua_assert(0); break; } lj_gc_check(L); |