Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Textbox backspace crash bug #148

@vzex

Description

@vzex

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:])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions