diff options
-rw-r--r-- | src/lstrlib.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js index 3872cb2..cd9278d 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -13,9 +13,6 @@ const CT = lua.constant_types; const sL_ESC = '%'; const L_ESC = sL_ESC.charCodeAt(0); -// (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) -const MAXSIZE = Number.MAX_SAFE_INTEGER; - /* ** maximum number of captures that a pattern can do during ** pattern-matching. This limit is arbitrary, but must fit in @@ -23,6 +20,10 @@ const MAXSIZE = Number.MAX_SAFE_INTEGER; */ const LUA_MAXCAPTURES = 32; +// (sizeof(size_t) < sizeof(int) ? MAX_SIZET : (size_t)(INT_MAX)) +const MAXSIZE = Number.MAX_SAFE_INTEGER; + + /* translate a relative string position: negative means back from end */ const posrelat = function(pos, len) { if (pos >= 0) return pos; |