diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 12:23:30 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 12:23:30 +0100 |
commit | f893be002aebd215b499b0c72803dd1346f4eb05 (patch) | |
tree | a2c83ccfacfb50e3dd1487e2d8b7562fafc4bb5c /src/luaconf.js | |
parent | 16cdb860e9e8e5550c1178a41eabb52e461ffa46 (diff) | |
download | fengari-f893be002aebd215b499b0c72803dd1346f4eb05.tar.gz fengari-f893be002aebd215b499b0c72803dd1346f4eb05.tar.bz2 fengari-f893be002aebd215b499b0c72803dd1346f4eb05.zip |
Fixed bad lua_tointegerx
Diffstat (limited to 'src/luaconf.js')
-rw-r--r-- | src/luaconf.js | 2 |
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 = ""; |