diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2021-05-26 20:11:57 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2021-05-26 20:32:40 +0000 |
| commit | 312510880e2e638a1fe68771c40392f4237582f3 (patch) | |
| tree | a143623e6be28fd7b8fbdef39479a93a7c55ea5e | |
| parent | 61acb3179a90a93ecb2fe9230986069712f918df (diff) | |
bc: Fix stack handling in the "P" command implementation
Approved by: so
Security: EN-21:16.bc
Submitted by: se
| -rw-r--r-- | contrib/bc/src/program.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/bc/src/program.c b/contrib/bc/src/program.c index d4e386d4ac1b..14a886d0daa3 100644 --- a/contrib/bc/src/program.c +++ b/contrib/bc/src/program.c @@ -1440,6 +1440,8 @@ static void bc_program_printStream(BcProgram *p) { size_t idx = (r->t == BC_RESULT_STR) ? r->d.loc.loc : n->scale; bc_program_printChars(*((char**) bc_vec_item(p->strs, idx))); } + + bc_vec_pop(&p->results); } static void bc_program_nquit(BcProgram *p, uchar inst) { |
