bgkillas / kalc

a complex numbers, 2d/3d graphing, arbitrary precision, vector/matrix, cli calculator with real-time output and support for units

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when trying to delete with cursor at the end of the line

lukasmican opened this issue · comments

When some text is in the input line and the cursor is at the end of the text, after pressing 'delete' the program crashes.

Steps to reproduce:

  1. Start kalc
  2. Enter some text or numbers
  3. Press 'delete'

Result:

>>> kalc
> asdfthread 'main' panicked at kalc-1.1.0/src/main.rs:885:35:
removal index (is 4) should be < len (is 4)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped)  kalc

whoops, fixed in 74ce727