aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-03-27 06:06:04 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-03-27 06:06:04 +0300
commitbc1c92f4a9365f799c9c7a78b41a4eb1c40326b7 (patch)
treeb14bd67f533d7cc508241179de1283391fb0971c /interpret.h
parent6522e5b623e083565229dc742336219a0dda1344 (diff)
parent7377dd1648a06b68f45c55fd54e07e6bcf29e66c (diff)
downloadegawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.tar.gz
egawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.tar.bz2
egawk-bc1c92f4a9365f799c9c7a78b41a4eb1c40326b7.zip
Merge branch 'master' into select
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h19
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) {