Fix arithmetic overflow in up-line

The C++ code implicitly relied on wrapping behavior.

There are probably more cases like this.  Maybe we should disable
"overflow-checks" in release mode.
This commit is contained in:
Johannes Altmanninger
2024-01-09 18:11:14 +01:00
parent 114ebe3b8f
commit e84d110995
3 changed files with 16 additions and 4 deletions

View File

@@ -9,3 +9,13 @@ tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> echo 12345
# CHECK: echo abcde
isolated-tmux send-keys C-c
tmux-sleep
isolated-tmux send-keys C-l
isolated-tmux send-keys begin Enter 'echo 1' Enter e n d C-p 23
tmux-sleep
isolated-tmux capture-pane -p
# CHECK: prompt 0> begin
# CHECK: echo 123
# CHECK: end