summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-25 09:05:10 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-25 09:05:10 +0000
commitf18218f2ad55a31ce10b349b4a87556c84b019d2 (patch)
treea07a239b7bbb6a22cef530fa3b10fdf299da6bec
parent8baeec4637c8d4cdeec63c6f023766e22afa6a48 (diff)
downloadzsh-f18218f2ad55a31ce10b349b4a87556c84b019d2.tar.gz
zsh-f18218f2ad55a31ce10b349b4a87556c84b019d2.tar.xz
zsh-f18218f2ad55a31ce10b349b4a87556c84b019d2.zip
fix a sizeof() to strlen()
-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] == ')' ||