summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:01:42 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-24 12:09:49 +0200
commit656758c86ad929b07bb6422eb0f44cf9f2347aac (patch)
tree9463a52cfa7e49245054577804f1bd6dcaf22ff8 /src/lobject.js
parentd15e00af0798783bdce5e27d2ab43de3ecb3fa4e (diff)
downloadfengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.gz
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.tar.bz2
fengari-656758c86ad929b07bb6422eb0f44cf9f2347aac.zip
Use maximum 32bit number instead of Number.MAX_SAFE_INTEGER
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lobject.js b/src/lobject.js
index 9a79c95..7409415 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -6,6 +6,7 @@ const assert = require('assert');
const ljstype = require('./ljstype.js');
const lua = require('./lua.js');
const luaconf = require('./luaconf.js');
+const llimit = require('./llimit.js');
const CT = lua.constant_types;
const UpVal = require('./lfunc.js').UpVal;
const char = lua.char;
@@ -427,8 +428,8 @@ const l_str2d = function(s) {
return end;
};
-const MAXBY10 = Number.MAX_SAFE_INTEGER / 10;
-const MAXLASTD = Number.MAX_SAFE_INTEGER % 10;
+const MAXBY10 = llimit.MAX_INT / 10;
+const MAXLASTD = llimit.MAX_INT % 10;
const l_str2int = function(s) {
let a = 0;