diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2015-11-25 18:51:00 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2015-11-25 18:51:00 +0100 |
commit | 317ec32cb1cbd15b31e17bcb07f09c52cd37c44a (patch) | |
tree | 88a02c853dfafd82a2d551d862d8dfb056b1bee6 /Src/Zle/compmatch.c | |
parent | 1637291aaea12ddcfd549d50d49c480185995c1a (diff) | |
parent | cce4261a3c6f4bf78b483db61623c80e3c98d10b (diff) | |
download | zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.tar.gz zsh-317ec32cb1cbd15b31e17bcb07f09c52cd37c44a.zip |
Merge tag 'zsh-5.1.1-test-1' into debian
Diffstat (limited to 'Src/Zle/compmatch.c')
-rw-r--r-- | Src/Zle/compmatch.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Src/Zle/compmatch.c b/Src/Zle/compmatch.c index 05ae43ae6..0e41ac3a5 100644 --- a/Src/Zle/compmatch.c +++ b/Src/Zle/compmatch.c @@ -338,8 +338,15 @@ add_match_str(Cmatcher m, char *l, char *w, int wl, int sfx) char *buf; buf = (char *) zalloc(blen); - memcpy(buf, matchbuf, matchbuflen); - zfree(matchbuf, matchbuflen); + if (matchbuf) { + memcpy(buf, matchbuf, matchbuflen); + zfree(matchbuf, matchbuflen); + } +#ifdef DEBUG + else { + DPUTS(matchbuflen, "matchbuflen with no matchbuf"); + } +#endif matchbuf = buf; matchbuflen = blen; } @@ -813,10 +820,12 @@ match_str(char *l, char *w, Brinfo *bpp, int bc, int *rwlp, continue; else if (mp->right) t = pattern_match(mp->right, - tl + mp->llen - mp->ralen, + /* tl + mp->llen - mp->ralen, */ + tl + mp->llen, NULL, NULL) && pattern_match(mp->right, - tw + mp->wlen - mp->ralen, + /* tw + mp->wlen - mp->ralen, */ + tw + mp->wlen, NULL, NULL) && (!mp->lalen || pattern_match(mp->left, tw + mp->wlen - |