From 1bd39e36abcac8b775125c1e06b0d789eb62ec08 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 8 Sep 1999 09:15:16 +0000 Subject: zsh-workers/7714 --- Src/Zle/zle_tricky.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index 672b049f7..357e248b3 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -2739,7 +2739,7 @@ comp_match(char *pfx, char *sfx, char *w, Patprog cp, mpl - rpl, 0); pli = matchparts; } - r = dupstring(matchbuf); + r = dupstring(matchbuf ? matchbuf : ""); *clp = pli; @@ -7133,7 +7133,8 @@ permmatches(void) ((g->flags & CGF_NOSORT) ? 0 : 2), &nn, &nl); g->mcount = nn; - g->lcount = nn - nl; + if ((g->lcount = nn - nl) < 0) + g->lcount = 0; if (g->ylist) { g->lcount = arrlen(g->ylist); smatches = 2; -- cgit 1.4.1