summary refs log tree commit diff
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
parentb8d2c8e6de327109bf9b50669704e027232253ed (diff)
downloadzsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.tar.gz
zsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.tar.xz
zsh-a8c7d3c0ee5eb1d4a83c86f68b5d22f9e44c6b3b.zip
fix for `function' without names (12710)
-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++;