about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c4
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 {