diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-08 09:15:16 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-08 09:15:16 +0000 |
commit | 1bd39e36abcac8b775125c1e06b0d789eb62ec08 (patch) | |
tree | e100036bdbc08785b212a76159014677a803a8a6 | |
parent | 1d24d00bbdad382348f164668f03db7b83dc8fa3 (diff) | |
download | zsh-1bd39e36abcac8b775125c1e06b0d789eb62ec08.tar.gz zsh-1bd39e36abcac8b775125c1e06b0d789eb62ec08.tar.xz zsh-1bd39e36abcac8b775125c1e06b0d789eb62ec08.zip |
zsh-workers/7714
-rw-r--r-- | Src/Zle/zle_tricky.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |