about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-07-03 11:07:39 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-07-03 11:07:39 +0000
commit936208bd9f36c7705ed0dd0966551b57a29d40a5 (patch)
tree06ef1c4e8b5d568d1612206f9b7afaa01192c5d0
parente81160def298a80d49d59779aa1bb2c6329618f4 (diff)
downloadzsh-936208bd9f36c7705ed0dd0966551b57a29d40a5.tar.gz
zsh-936208bd9f36c7705ed0dd0966551b57a29d40a5.tar.xz
zsh-936208bd9f36c7705ed0dd0966551b57a29d40a5.zip
18769: handle parse errors in autoload functions properly
-rw-r--r--ChangeLog6
-rw-r--r--Src/exec.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index db1ac681d..25228940c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-03  Peter Stephenson  <pws@csr.com>
+
+	* 18769: Src/exec.c: parse error in autoloading file causes
+	return value zero and empty function definition.  Presumed
+	to be error introduced with wordcode.
+
 2003-06-25  Oliver Kiddle  <opk@zsh.org>
 
 	* 18634: Tomi Vainio: Src/system.h: work around problem with
diff --git a/Src/exec.c b/Src/exec.c
index bcd0e93bb..ad992e23e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3339,7 +3339,7 @@ loadautofn(Shfunc shf, int fksh, int autol)
 	return NULL;
     }
     if (!prog)
-	prog = &dummy_eprog;
+	return NULL;
     if (ksh == 2 || (ksh == 1 && isset(KSHAUTOLOAD))) {
 	if (autol) {
 	    prog->flags |= EF_RUN;