From 97a52383d4194678b781e8826c6512fc6fe40288 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 9 Oct 2017 07:49:20 +0200 Subject: Removed incorrect use of llimits.MAX/MIN_INT llimit.js is renamed to llimits.js --- src/lutf8lib.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lutf8lib.js') diff --git a/src/lutf8lib.js b/src/lutf8lib.js index b69abb0..3baeeef 100644 --- a/src/lutf8lib.js +++ b/src/lutf8lib.js @@ -2,7 +2,6 @@ const lua = require('./lua.js'); const lauxlib = require('./lauxlib.js'); -const llimit = require('./llimit.js'); const MAXUNICODE = 0x10FFFF; @@ -160,7 +159,7 @@ const codepoint = function(L) { lauxlib.luaL_argcheck(L, pose <= s.length, 3, lua.to_luastring("out of range", true)); if (posi > pose) return 0; /* empty interval; return no values */ - if (pose - posi >= llimit.MAX_INT) + if (pose - posi >= Number.MAX_SAFE_INTEGER) return lauxlib.luaL_error(L, lua.to_luastring("string slice too long", true)); let n = (pose - posi) + 1; lauxlib.luaL_checkstack(L, n, lua.to_luastring("string slice too long", true)); -- cgit v1.2.3-54-g00ecf