From f5fd22203eadf57ccbaa4a298010d23974b22fc0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sun, 29 Sep 2024 16:46:29 +0200 Subject: [PATCH] Fix bit op coercion in DUALNUM builds. Thanks to Sergey Kaplun. #1273 --- src/lj_carith.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lj_carith.c b/src/lj_carith.c index 9bea0a33..ffda626e 100644 --- a/src/lj_carith.c +++ b/src/lj_carith.c @@ -349,9 +349,7 @@ uint64_t lj_carith_check64(lua_State *L, int narg, CTypeID *id) if (LJ_LIKELY(tvisint(o))) { return (uint32_t)intV(o); } else { - int32_t i = lj_num2bit(numV(o)); - if (LJ_DUALNUM) setintV(o, i); - return (uint32_t)i; + return (uint32_t)lj_num2bit(numV(o)); } }