From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: hash completion bug?
Date: Tue, 16 Jan 2001 13:37:45 +0100 (MET) [thread overview]
Message-ID: <200101161237.NAA02693@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Hiroki Tamakoshi's message of 16 Jan 2001 21:03:21 +0900
Hiroki Tamakoshi wrote:
> % zsh -f
> % typeset -A foo
> % foo[TAB
> cause segmentation fault.
Urgh. compctl.
Better test if there is already a hashtable before trying to use it.
Bye
Sven
Index: Src/Zle/compctl.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compctl.c,v
retrieving revision 1.7
diff -u -r1.7 compctl.c
--- Src/Zle/compctl.c 2000/06/22 08:42:37 1.7
+++ Src/Zle/compctl.c 2001/01/16 12:37:05
@@ -3749,7 +3749,10 @@
dumphashtable(aliastab, t | (cc->mask & (CC_DISCMDS|CC_EXCMDS)));
if (keypm && cc == &cc_dummy) {
/* Add the keys of the parameter in keypm. */
- scanhashtable(keypm->gets.hfn(keypm), 0, 0, PM_UNSET, addhnmatch, 0);
+ HashTable t = keypm->gets.hfn(keypm);
+
+ if (t)
+ scanhashtable(t, 0, 0, PM_UNSET, addhnmatch, 0);
keypm = NULL;
cc_dummy.suffix = NULL;
}
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
reply other threads:[~2001-01-16 12:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200101161237.NAA02693@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).