1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

21402: Fix crash with case-insensitive matching.

This commit is contained in:
Peter Stephenson 2005-07-06 10:01:19 +00:00
parent 3538c874b1
commit 75f853f2e3
2 changed files with 23 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2005-07-06 Peter Stephenson <pws@csr.com>
* 21402: Src/Zle/compmatch.c: Fix crash completing the set
of files AIWebKitMessageViewController.m,
AIWebKitMessageViewPlugin.m, AIWebkitMessageViewStyle.m
with case-insensitive matching.
2005-07-03 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
* unposted: Completion/Unix/Command/_w3m: add missing compset -S calls

View file

@ -803,14 +803,26 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp,
/* Probably add the matched strings. */
if (!test) {
if (sfx)
add_match_str(NULL, NULL, w, ow - w, sfx);
{
if (ow >= w)
add_match_str(NULL, NULL, w, ow - w, sfx);
}
else
add_match_str(NULL, NULL, ow, w - ow, sfx);
{
if (w >= ow)
add_match_str(NULL, NULL, ow, w - ow, sfx);
}
add_match_str(mp, tl, tw, mp->wlen, sfx);
if (sfx)
add_match_sub(NULL, NULL, 0, w, ow - w);
{
if (ow >= w)
add_match_sub(NULL, NULL, 0, w, ow - w);
}
else
add_match_sub(NULL, NULL, 0, ow, w - ow);
{
if (w >= ow)
add_match_sub(NULL, NULL, 0, ow, w - ow);
}
add_match_sub(mp, tl, mp->llen, tw, mp->wlen);
}
if (sfx) {