diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2015-03-24 20:36:04 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2015-03-24 20:36:04 -0400 |
commit | 7377dd1648a06b68f45c55fd54e07e6bcf29e66c (patch) | |
tree | cf52169d8382d2a5c2bcd521cd2958e93877ff81 /interpret.h | |
parent | 56e848ab0b55cc98f206ab7e187ba8269f2e8e4c (diff) | |
parent | 90e1d42a99178608ec22216f7f35dadcad5a8b3a (diff) | |
download | egawk-7377dd1648a06b68f45c55fd54e07e6bcf29e66c.tar.gz egawk-7377dd1648a06b68f45c55fd54e07e6bcf29e66c.tar.bz2 egawk-7377dd1648a06b68f45c55fd54e07e6bcf29e66c.zip |
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'interpret.h')
-rw-r--r-- | interpret.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/interpret.h b/interpret.h index 3a9cab37..dee53957 100644 --- a/interpret.h +++ b/interpret.h @@ -1313,17 +1313,18 @@ match_re: fatal(_("`exit' cannot be called in the current context")); exiting = true; - t1 = POP_NUMBER(); - exit_val = (int) get_number_si(t1); - DEREF(t1); + if ((t1 = POP_NUMBER()) != Nnull_string) { + exit_val = (int) get_number_si(t1); #ifdef VMS - if (exit_val == 0) - exit_val = EXIT_SUCCESS; - else if (exit_val == 1) - exit_val = EXIT_FAILURE; - /* else - just pass anything else on through */ + if (exit_val == 0) + exit_val = EXIT_SUCCESS; + else if (exit_val == 1) + exit_val = EXIT_FAILURE; + /* else + just pass anything else on through */ #endif + } + DEREF(t1); if (currule == BEGINFILE || currule == ENDFILE) { |