1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 23:31:08 +02:00

Fix infinite loop on `r OLD=NEW' when OLD is the empty string.

This commit is contained in:
Bart Schaefer 2001-07-08 00:33:45 +00:00
parent 22faf1fa4b
commit d8aee67492

View file

@ -1250,6 +1250,10 @@ bin_fc(char *nam, char **argv, char *ops, int func)
while (*argv && equalsplit(*argv, &s)) {
Asgment a = (Asgment) zhalloc(sizeof *a);
if (!**argv) {
zwarnnam(nam, "invalid replacement pattern: =%s", s, 0);
return 1;
}
if (!asgf)
asgf = asgl = a;
else {