summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/compmatch.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 270cf39ea..f65822e88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+ 2021-12-24  Bart Schaefer  <schaefer@zsh.org>
+
+	* m0viefreak: 38150: Src/Zle/compmatch.c: fix off-by-one error
+	in matcher spec parsing
+
 2021-12-21  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 49658: Src/glob.c: Remove erroneous use of NULL pointer for
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c
index 56e5509a4..bb8359f1d 100644
--- a/Src/Zle/compmatch.c
+++ b/Src/Zle/compmatch.c
@@ -1319,7 +1319,7 @@ pattern_match_equivalence(Cpattern lp, convchar_t wind, int wmtp,
     convchar_t lchr;
     int lmtp;
 
-    if (!PATMATCHINDEX(lp->u.str, wind-1, &lchr, &lmtp)) {
+    if (!PATMATCHINDEX(lp->u.str, wind, &lchr, &lmtp)) {
 	/*
 	 * No equivalent.  No possible match; give up.
 	 */