aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 01442c33b..c1601a3e4 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -6926,6 +6926,7 @@ static const char bc_lib[] ALIGN1 = {
6926 6926
6927static BC_STATUS zbc_vm_exec(void) 6927static BC_STATUS zbc_vm_exec(void)
6928{ 6928{
6929 char **fname;
6929 BcStatus s; 6930 BcStatus s;
6930 size_t i; 6931 size_t i;
6931 6932
@@ -6941,13 +6942,16 @@ static BC_STATUS zbc_vm_exec(void)
6941#endif 6942#endif
6942 6943
6943 s = BC_STATUS_SUCCESS; 6944 s = BC_STATUS_SUCCESS;
6944 for (i = 0; !s && i < G.files.len; ++i) 6945 fname = (void*)G.files.v;
6945 s = zbc_vm_file(*((char **) bc_vec_item(&G.files, i))); 6946 for (i = 0; i < G.files.len; i++) {
6946 if (ENABLE_FEATURE_CLEAN_UP && s && !G_ttyin) { 6947 s = zbc_vm_file(*fname++);
6947 // Debug config, non-interactive mode: 6948 if (ENABLE_FEATURE_CLEAN_UP && !G_ttyin && s) {
6948 // return all the way back to main. 6949 // Debug config, non-interactive mode:
6949 // Non-debug builds do not come here, they exit. 6950 // return all the way back to main.
6950 RETURN_STATUS(s); 6951 // Non-debug builds do not come here
6952 // in non-interactive mode, they exit.
6953 RETURN_STATUS(s);
6954 }
6951 } 6955 }
6952 6956
6953 if (IS_BC || (option_mask32 & BC_FLAG_I)) 6957 if (IS_BC || (option_mask32 & BC_FLAG_I))