about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/computil.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d60a2406..40c357b12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,10 @@
 	typeset_single() calls setsparam() in some circumstances; drop a
 	redundant isident() test.
 
+2001-04-25  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* ?????: Src/Zle/computil.c: fix a sizeof() to strlen(). ahem.
+
 2001-04-19  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 14046: Doc/Zle/zle.yo, Src/Zle/zle_keymap.c: bindkey -rp removes
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 6bc7acbc8..e927081f7 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3261,7 +3261,7 @@ cfp_opt_pats(char **pats, char *matcher)
 	if (haswilds(t))
 	    return;
     }
-    add = (char *) zhalloc(sizeof(compprefix) * 2 + 1);
+    add = (char *) zhalloc(strlen(compprefix) * 2 + 1);
     for (s = compprefix, t = add; *s; s++) {
 	if (*s != '\\' || !s[1] || s[1] == '*' || s[1] == '?' ||
 	    s[1] == '<' || s[1] == '>' || s[1] == '(' || s[1] == ')' ||