1
0
mirror of https://github.com/zsh-users/zsh synced 2024-07-08 19:55:44 +00:00

18769: handle parse errors in autoload functions properly

This commit is contained in:
Peter Stephenson 2003-07-03 11:07:39 +00:00
parent e81160def2
commit 936208bd9f
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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;