about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/exec.c2
-rw-r--r--Src/parse.c6
2 files changed, 7 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 45f771bd2..e021a4581 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3096,6 +3096,8 @@ loadautofn(Shfunc shf)
 	zerr("%s: function definition file not found", shf->nam, 0);
 	return 1;
     }
+    if (!prog)
+	prog = &dummy_eprog;
     PERMALLOC {
 	shf->funcdef = dupeprog(stripkshdef(prog, shf->nam));
     } LASTALLOC;
diff --git a/Src/parse.c b/Src/parse.c
index 9d450fc26..8d72b4826 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -357,7 +357,11 @@ parse_list(void)
     incmdpos = 1;
     yylex();
     ret = par_list();
-    if (tok == LEXERR) {
+#if 0
+    if (tok == LEXERR)
+#endif
+    if (tok != ENDINPUT)
+    {
 	yyerror(0);
 	return NULL;
     }