diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-27 06:40:45 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2015-03-27 06:40:45 +0300 |
commit | 3fad6ad12e1637c4e1b72fbeaf0265f44da0cf27 (patch) | |
tree | 8e83597d27430370914142150647e11c07410e0b /interpret.h | |
parent | 603eb56251817ac19491b7671ed01402b2d7399c (diff) | |
parent | 7d3d7d27391db40c0561ea47e6b8a5a1ae24c6fb (diff) | |
download | egawk-3fad6ad12e1637c4e1b72fbeaf0265f44da0cf27.tar.gz egawk-3fad6ad12e1637c4e1b72fbeaf0265f44da0cf27.tar.bz2 egawk-3fad6ad12e1637c4e1b72fbeaf0265f44da0cf27.zip |
Merge branch 'master' into wasted-byte
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 665f6faa..cf158ca6 100644 --- a/interpret.h +++ b/interpret.h @@ -1314,17 +1314,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) { |