summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/exec.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 784b82f66..644e7694a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-08-28 Sven Wischnowsky <wischnow@zsh.org>
+
+ * 12710: Src/exec.c: fix for `function' without names
+
2000-08-27 Oliver Kiddle <opk@zsh.org>
* 12708: Completion/AIX/_logical_volumes: new AIX completion function
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++;