diff options
-rw-r--r-- | Src/builtin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 110a264f2..11324a0cd 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -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 { |