about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/compresult.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 78a9684b1..7f81ce31a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-08-22  Peter Stephenson  <pws@csr.com>
 
+	* 23794: Src/Zle/compresult.c: completing on 'echo "foo$"<TAB>'
+	was broken.  The code is as opaque as usual but preventing the
+	crash seems straightforward.
+
 	* 23792: Doc/Zsh/expn.yo, Test/D07multibyte.ztst:  test
 	and documentation for 23784.
 
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);