Skip to content

Crash on empty keyboard event #187

@StefanStrategis

Description

@StefanStrategis

The eventKey string in KeyboardDownHandler can be practically empty and cannot be parsed in those occasions, causing an enum parse error in Event.KeyboardEvent, or crash if exceptions are disabled.

The content of the string in these occasions is #, ^ or &.

instance.input.CreateKeyEvent(Event.KeyboardEvent(eventKey));

Can be fixed by adding the following lines in front of line above

if (eventKey.Length == 1) {
    return;
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions