From 431d44fbc7a05dc282641172bd2ddbaf0d6cd9cc Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 14 Dec 2017 14:39:08 +1100 Subject: src/lstrlib.js: Remove .slice from end of string check --- src/lstrlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lstrlib.js b/src/lstrlib.js index 6a0da58..0572e95 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1008,7 +1008,7 @@ const match = function(ms, s, p) { gotodefault = true; /* no; go to default */ break; } - s = ms.src.slice(s).length === 0 ? s : null; /* check end of string */ + s = (ms.src.length - s) === 0 ? s : null; /* check end of string */ break; } case L_ESC: { /* escaped sequences not in the format class[*+?-]? */ -- cgit v1.2.3-70-g09d2