From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24445 invoked from network); 16 Jan 2001 12:38:10 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jan 2001 12:38:10 -0000 Received: (qmail 27021 invoked by alias); 16 Jan 2001 12:37:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13364 Received: (qmail 27004 invoked from network); 16 Jan 2001 12:37:49 -0000 Date: Tue, 16 Jan 2001 13:37:45 +0100 (MET) Message-Id: <200101161237.NAA02693@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Hiroki Tamakoshi's message of 16 Jan 2001 21:03:21 +0900 Subject: PATCH: Re: hash completion bug? 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