summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-06-15 00:50:58 +1000
committerdaurnimator <quae@daurnimator.com>2017-06-15 00:50:58 +1000
commit2105854719431aa7a9288ad3647a67883224d150 (patch)
treed0377098472ddf3979a6194132b7eed977e7bad0 /src
parenta8449d7b4beb346099f57d64f0c58ab38cc2910f (diff)
downloadfengari-2105854719431aa7a9288ad3647a67883224d150.tar.gz
fengari-2105854719431aa7a9288ad3647a67883224d150.tar.bz2
fengari-2105854719431aa7a9288ad3647a67883224d150.zip
src/lstrlib.js: Fix stopping before end of gmatch subject
Diffstat (limited to 'src')
-rw-r--r--src/lstrlib.js2
1 files changed, 1 insertions, 1 deletions
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) {