mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 09:26:26 +00:00
4867e14d60
Clear the selection after deleting a character. Not doing so can result in out-of-bounds reads in EditTextWidget::drawWidget(), where _selCaretPos and _selOffset are used as offsets, and to a failed assertion when calling EditableWidget::defaultKeyDownHandler(): gui/widgets/editable.cpp:566: bool GUI::EditableWidget::setCaretPos(int): Assertion `newPos >= 0 && newPos <= (int)_editString.size()' failed. Fixes #14584