From 2ff14d930ec8bee0c2c0190c1dd6f5584236342d Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 12 Jun 2017 15:42:42 +0200 Subject: lstrlib.js: matchbalance fixed wrong char lookup --- 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 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 */ -- cgit v1.2.3-70-g09d2