aboutsummaryrefslogtreecommitdiffstats
path: root/module/lua/lobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/lua/lobject.c')
-rw-r--r--module/lua/lobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/lua/lobject.c b/module/lua/lobject.c
index f74dacdf5..ea1f9a8e3 100644
--- a/module/lua/lobject.c
+++ b/module/lua/lobject.c
@@ -143,7 +143,7 @@ static lua_Number lua_strx2number (const char *s, char **endptr) {
*endptr = cast(char *, s); /* valid up to here */
ret:
if (neg) r = -r;
- return (r * (1 << e));
+ return ((e >= 0) ? (r * (1ULL << e)) : (r / (1ULL << -e)));
}
#endif