1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-29 05:21:00 +01:00

fix for empty (s::) separator and strings with meta-characters (11368)

This commit is contained in:
Sven Wischnowsky 2000-05-15 11:01:41 +00:00
parent 3f630b6abf
commit 2e78e1ecc1
2 changed files with 11 additions and 1 deletions

View file

@ -1764,7 +1764,14 @@ findsep(char **s, char *sep)
return i;
}
if (!sep[0]) {
return **s ? ++*s, 1 : -1;
if (**s) {
if (**s == Meta)
*s += 2;
else
++*s;
return 1;
}
return -1;
}
for (i = 0; **s; i++) {
for (t = sep, tt = *s; *t && *tt && *t == *tt; t++, tt++);