[git commit] bc: move fflush to the _actual_ execution loop

Denys Vlasenko vda.linux at googlemail.com
Mon Dec 17 00:22:53 UTC 2018


commit: https://git.busybox.net/busybox/commit/?id=c5774a3458ab660e9f75526b3cd8e67da520e0ae
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 miscutils/bc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/miscutils/bc.c b/miscutils/bc.c
index 24d1ebba6..c92f6f813 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -6875,6 +6875,8 @@ static BC_STATUS zbc_program_exec(void)
 			RETURN_STATUS(s);
 		}
 
+		fflush_and_check();
+
 		// If the stack has changed, pointers may be invalid.
 		ip = bc_vec_top(&G.prog.stack);
 		func = bc_program_func(ip->func);
@@ -6920,7 +6922,6 @@ static BC_STATUS zbc_vm_process(const char *text)
 			bc_program_reset();
 			break;
 		}
-		fflush_and_check();
 	}
 
 	dbg_lex_done("%s:%d done", __func__, __LINE__);


More information about the busybox-cvs mailing list