summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-14 14:39:08 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-14 14:40:57 +1100
commit431d44fbc7a05dc282641172bd2ddbaf0d6cd9cc (patch)
treedca2484297da7f48926d198e82e5854620cc372c
parentf3fbb2d8460f8d3a419a07f2efa569b2422a8f04 (diff)
downloadfengari-431d44fbc7a05dc282641172bd2ddbaf0d6cd9cc.tar.gz
fengari-431d44fbc7a05dc282641172bd2ddbaf0d6cd9cc.tar.bz2
fengari-431d44fbc7a05dc282641172bd2ddbaf0d6cd9cc.zip
src/lstrlib.js: Remove .slice from end of string check
-rw-r--r--src/lstrlib.js2
1 files changed, 1 insertions, 1 deletions
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[*+?-]? */