Textbox backspace crash bug
vzex opened this issue · comments
because the cart position may move after the "func (t *TextBoxController) Backspace() { " called,
in line 465 of textbox_controller.go, the end may be larger than len(text),and it will crash.
fix:
add
if s.end > len(text) {s.end = len(text)}
before
copy(text[s.start:], text[s.end:])