summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/Zle/compcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 1f81f989f..1caad5484 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -2501,7 +2501,7 @@ add_match_data(int alt, char *str, char *orig, Cline line,
     if (new_str) {
 	*t = '\0';
 	str = new_str;
-	stl = strlen(str);
+	stl = t - str;
     }
 #endif