diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-24 12:01:42 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-24 12:09:49 +0200 |
commit | 656758c86ad929b07bb6422eb0f44cf9f2347aac (patch) | |
tree | 9463a52cfa7e49245054577804f1bd6dcaf22ff8 /src/luaconf.js | |
parent | d15e00af0798783bdce5e27d2ab43de3ecb3fa4e (diff) | |
download | fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.gz fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.bz2 fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.zip |
Use maximum 32bit number instead of Number.MAX_SAFE_INTEGER
Diffstat (limited to 'src/luaconf.js')
-rw-r--r-- | src/luaconf.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/luaconf.js b/src/luaconf.js index 3314d5c..803bb90 100644 --- a/src/luaconf.js +++ b/src/luaconf.js @@ -1,6 +1,8 @@ /*jshint esversion: 6 */ "use strict"; +const llimit = require('./llimit.js'); + /* @@ LUAI_MAXSTACK limits the size of the Lua stack. ** CHANGE it if you need a different limit. This limit is arbitrary; @@ -17,7 +19,7 @@ const LUAI_MAXSTACK = 1000000; const LUA_IDSIZE = 60; const lua_numbertointeger = function(n) { - return n >= Number.MIN_SAFE_INTEGER && n < -Number.MIN_SAFE_INTEGER ? n : 0; + return n >= llimit.MIN_INT && n < -llimit.MIN_INT ? n : 0; }; const LUA_INTEGER_FRMLEN = ""; |