aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-07-21 21:35:14 -0600
committerGavin Howard <gavin@yzena.com>2021-07-21 21:35:14 -0600
commit1d8f1e5f77de949ab0206af69a24a2cd16587cb2 (patch)
treed3f6e36f08fb0a86a8a2949e73f77e1c8bfdb303 /src
parent54f887af733b2327f264f9b20c4e6ef0ca40dc34 (diff)
downloadplatform_external_bc-1d8f1e5f77de949ab0206af69a24a2cd16587cb2.tar.gz
platform_external_bc-1d8f1e5f77de949ab0206af69a24a2cd16587cb2.tar.bz2
platform_external_bc-1d8f1e5f77de949ab0206af69a24a2cd16587cb2.zip
Fix a history bug found by asciify()
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'src')
-rw-r--r--src/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/history.c b/src/history.c
index 2d62676a..6da3d9a0 100644
--- a/src/history.c
+++ b/src/history.c
@@ -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);