From 2105854719431aa7a9288ad3647a67883224d150 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 15 Jun 2017 00:50:58 +1000 Subject: src/lstrlib.js: Fix stopping before end of gmatch subject --- 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 b19d4d8..d224a56 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1239,7 +1239,7 @@ class GMatchState { const gmatch_aux = function(L) { let gm = lua.lua_touserdata(L, lua.lua_upvalueindex(3)); gm.ms.L = L; - for (let src = gm.src; src < gm.ms.src_end; src++) { + for (let src = gm.src; src <= gm.ms.src_end; src++) { reprepstate(gm.ms); let e; if ((e = match(gm.ms, src, gm.p)) !== null && e !== gm.lastmatch) { -- cgit v1.2.3-70-g09d2