about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-28 07:04:34 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-28 07:04:34 +0000
commita8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b (patch)
tree7456293d034202dbb23ecd8f4a78a0575338b30b /Src/exec.c
parentb8d2c8e6de327109bf9b50669704e027232253ed (diff)
downloadzsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.tar.gz
zsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.tar.xz
zsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.zip
fix for `function' without names (12710)
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 698591475..8d26e604a 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3070,7 +3070,10 @@ execfuncdef(Estate state, int do_exec)
     LinkList names;
 
     end = beg + WC_FUNCDEF_SKIP(state->pc[-1]);
-    names = ecgetlist(state, *state->pc++, EC_DUPTOK, &htok);
+    if (!(names = ecgetlist(state, *state->pc++, EC_DUPTOK, &htok))) {
+	state->pc = end;
+	return 0;
+    }
     nprg = end - beg;
     sbeg = *state->pc++;
     nstrs = *state->pc++;