summaryrefslogtreecommitdiff
path: root/src/luaconf.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaconf.js')
-rw-r--r--src/luaconf.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luaconf.js b/src/luaconf.js
index a965954..190893a 100644
--- a/src/luaconf.js
+++ b/src/luaconf.js
@@ -17,7 +17,7 @@ const LUAI_MAXSTACK = 1000000;
const LUA_IDSIZE = 60;
const lua_numbertointeger = function(n) {
- return n;
+ return n >= Number.MIN_SAFE_INTEGER && n < -Number.MIN_SAFE_INTEGER ? n : 0;
};
const LUA_INTEGER_FRMLEN = "";