summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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 4b83ac1..ccb0c16 100644
--- a/src/lstrlib.js
+++ b/src/lstrlib.js
@@ -934,7 +934,7 @@ const matchbalance = function(ms, s, p) {
if (ms.src[s] === e) {
if (--cont === 0) return s + 1;
}
- else if (s === b) cont++;
+ else if (ms.src[s] === b) cont++;
}
}
return null; /* string ends out of balance */