about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-05-06 22:37:51 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-05-06 22:37:51 +0000
commit5aa1c04fd6358cfd5de9f7ddde78000ef73da8e5 (patch)
tree804aa24606527503085701d0c1695a319fb2fbec
parentd58c1780fd6c528ee953a44f7739ce0021ac26b5 (diff)
downloadzsh-5aa1c04fd6358cfd5de9f7ddde78000ef73da8e5.tar.gz
zsh-5aa1c04fd6358cfd5de9f7ddde78000ef73da8e5.tar.xz
zsh-5aa1c04fd6358cfd5de9f7ddde78000ef73da8e5.zip
Prevent "no multi-letter values" error on values of '\:' and '' in compvalues().
-rw-r--r--Src/Zle/computil.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 90544b9c2..a4620151b 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2119,6 +2119,7 @@ parse_cvdef(char *nam, char **args)
     ret->lastt = time(0);
 
     for (valp = &(ret->vals); *args; args++) {
+	int bs = 0;
 	p = dupstring(*args);
 	xnum = 0;
 
@@ -2166,9 +2167,9 @@ parse_cvdef(char *nam, char **args)
 
 	for (name = p; *p && *p != ':' && *p != '['; p++)
 	    if (*p == '\\' && p[1])
-		p++;
+		p++, bs = 1;
 
-	if (hassep && !sep && name + 1 != p) {
+	if (hassep && !sep && name + bs + 1 < p) {
 	    freecvdef(ret);
 	    zwarnnam(nam, "no multi-letter values with empty separator allowed", NULL, 0);
 	    return NULL;