summaryrefslogtreecommitdiff
path: root/src/lstrlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-10 08:13:59 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-10 08:13:59 +0200
commitb303b1d4d12e6e8618e606ad04c32e45c235c93a (patch)
tree33d9b20913442ab202401fc0ce06e4243876581c /src/lstrlib.js
parent6f2f46187fc6947ca63356f735552feebd80d4a9 (diff)
downloadfengari-b303b1d4d12e6e8618e606ad04c32e45c235c93a.tar.gz
fengari-b303b1d4d12e6e8618e606ad04c32e45c235c93a.tar.bz2
fengari-b303b1d4d12e6e8618e606ad04c32e45c235c93a.zip
Fixed bad anchor test
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r--src/lstrlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js
index 90341e7..81b754d 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -1198,7 +1198,7 @@ const str_find_aux = function(L, find) {
} else {
let ms = new MatchState(L);
let s1 = init - 1;
- let anchor = s[0] === char['^'];
+ let anchor = p[0] === char['^'];
if (anchor) {
p = p.slice(1); lp--; /* skip anchor character */
}