summary refs log tree commit diff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 62a35122f..021330ddb 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1148,7 +1148,7 @@ do_single(Cmatch m)
 		makesuffixstr(m->remf, m->rems, 1);
 	}
     }
-    if (minfo.we && partest && isset(AUTOPARAMKEYS)) {
+    if (minfo.we && partest && isset(AUTOPARAMKEYS) && minfo.insc - parq > 0) {
 	/* the suffix code needs numbers of characters, not octets */
 	int outlen;
 	char *tmpstr = dupstrpfx(zlemetaline + parq, minfo.insc - parq);