diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lstrlib.js | 2 |
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[*+?-]? */ |