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:
parent
22faf1fa4b
commit
d8aee67492
1 changed files with 4 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue