From b303b1d4d12e6e8618e606ad04c32e45c235c93a Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 10 Apr 2017 08:13:59 +0200 Subject: Fixed bad anchor test --- src/lstrlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 */ } -- cgit v1.2.3-70-g09d2