diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 3 | ||||
-rw-r--r-- | Src/loop.c | 2 | ||||
-rw-r--r-- | Src/parse.c | 7 |
3 files changed, 10 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index d6715a328..336983e46 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -735,6 +735,9 @@ execsimple(Estate state) { wordcode code = *state->pc++; + if (errflag) + return (lastval = 1); + if (code) lineno = code - 1; diff --git a/Src/loop.c b/Src/loop.c index b1edb22c4..668f47b97 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -171,6 +171,7 @@ execfor(Estate state, int do_exec) popheap(); cmdpop(); loops--; + state->pc = end; return lastval; } @@ -394,6 +395,7 @@ execwhile(Estate state, int do_exec) cmdpop(); popheap(); loops--; + state->pc = end; return lastval; } diff --git a/Src/parse.c b/Src/parse.c index d8028f296..373e35ab9 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2404,6 +2404,7 @@ build_dump(char *nam, char *dump, char **files, int ali, int map) close(dfd); zerrnam(nam, "can't open file: %s", *files, 0); noaliases = ona; + unlink(dump); return 1; } file = (char *) zalloc(flen + 1); @@ -2415,17 +2416,19 @@ build_dump(char *nam, char *dump, char **files, int ali, int map) zfree(file, flen); zerrnam(nam, "can't read file: %s", *files, 0); noaliases = ona; + unlink(dump); return 1; } close(fd); file = metafy(file, flen, META_REALLOC); if (!(prog = parse_string(file, 1)) || errflag) { + errflag = 0; close(dfd); zfree(file, flen); - zerrnam(nam, "can't read file: %s", *files, 0); + zwarnnam(nam, "can't read file: %s", *files, 0); noaliases = ona; - errflag = 0; + unlink(dump); return 1; } zfree(file, flen); |