about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-19 11:43:12 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-06-19 11:43:12 +0000
commit11ec14c3b3942cf2c790bf077e704f745b754db9 (patch)
tree46be924034566539bcce8d54d5d3f6d20be7bee5 /Src
parent083befef2bfe9a93dbf6a6acfe2faed7f743d6ed (diff)
downloadzsh-11ec14c3b3942cf2c790bf077e704f745b754db9.tar.gz
zsh-11ec14c3b3942cf2c790bf077e704f745b754db9.tar.xz
zsh-11ec14c3b3942cf2c790bf077e704f745b754db9.zip
more careful when optimising patterns in compfiles (11981)
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/computil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 3955ed69d..d65eaa5bf 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -3159,7 +3159,7 @@ cfp_matcher_pats(char *matcher, char *add)
 		if (m->wlen < 0 && !m->llen && m->ralen == 1) {
 		    for (tmp = add, tl = al, mp = ms; tl; tl--, tmp++, mp++) {
 			if (pattern_match(m->right, tmp, NULL, NULL)) {
-			    if (*mp) {
+			    if (*mp || (tmp == add && *tmp == '.')) {
 				*tmp = '\0';
 				al = tmp - add;
 				break;
@@ -3190,7 +3190,7 @@ cfp_matcher_pats(char *matcher, char *add)
 		    }
 	}
 	if (*add) {
-	    char *ret = "", buf[259];
+	    char *ret = "", buf[259], *oadd = add;
 
 	    for (mp = ms; *add; add++, mp++) {
 		if (!(m = *mp)) {