Fix a history bug found by asciify()

Signed-off-by: Gavin Howard <[email protected]>
This commit is contained in:
Gavin Howard 2021-07-21 21:35:14 -06:00
parent 54f887af73
commit 1d8f1e5f77
Signed by: gavin
GPG Key ID: C08038BDF280D33E
1 changed files with 1 additions and 1 deletions

View File

@ -757,7 +757,7 @@ static void bc_history_refresh(BcHistory *h) {
// Write the prompt, if desired.
if (BC_PROMPT) bc_file_write(&vm.fout, bc_flush_none, h->prompt, h->plen);
bc_file_write(&vm.fout, bc_flush_none, h->buf.v, len);
bc_file_write(&vm.fout, bc_flush_none, h->buf.v, len - extras_len);
// Erase to right.
bc_file_write(&vm.fout, bc_flush_none, "\x1b[0K", 4);