diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-17 01:22:53 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-17 01:22:53 +0100 |
commit | c5774a3458ab660e9f75526b3cd8e67da520e0ae (patch) | |
tree | b7025354446b521fce38a758aeb426ddd7788b34 | |
parent | 51b22b1bce7c7bf656897ee38c409aa0abd64403 (diff) | |
download | busybox-w32-c5774a3458ab660e9f75526b3cd8e67da520e0ae.tar.gz busybox-w32-c5774a3458ab660e9f75526b3cd8e67da520e0ae.tar.bz2 busybox-w32-c5774a3458ab660e9f75526b3cd8e67da520e0ae.zip |
bc: move fflush to the _actual_ execution loop
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/bc.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
6875 | RETURN_STATUS(s); | 6875 | RETURN_STATUS(s); |
6876 | } | 6876 | } |
6877 | 6877 | ||
6878 | fflush_and_check(); | ||
6879 | |||
6878 | // If the stack has changed, pointers may be invalid. | 6880 | // If the stack has changed, pointers may be invalid. |
6879 | ip = bc_vec_top(&G.prog.stack); | 6881 | ip = bc_vec_top(&G.prog.stack); |
6880 | func = bc_program_func(ip->func); | 6882 | func = bc_program_func(ip->func); |
@@ -6920,7 +6922,6 @@ static BC_STATUS zbc_vm_process(const char *text) | |||
6920 | bc_program_reset(); | 6922 | bc_program_reset(); |
6921 | break; | 6923 | break; |
6922 | } | 6924 | } |
6923 | fflush_and_check(); | ||
6924 | } | 6925 | } |
6925 | 6926 | ||
6926 | dbg_lex_done("%s:%d done", __func__, __LINE__); | 6927 | dbg_lex_done("%s:%d done", __func__, __LINE__); |