diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-27 06:06:04 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-27 06:06:04 +0300 |
commit | bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7 (patch) | |
tree | b14bd67f533d7cc508241179de1283391fb0971c /interpret.h | |
parent | 6522e5b623e083565229dc742336219a0dda1344 (diff) | |
parent | 7377dd1648a06b68f45c55fd54e07e6bcf29e66c (diff) | |
download | egawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.tar.gz egawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.tar.bz2 egawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.zip |
Merge branch 'master' into select
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) { |