Fix for bug #1570189 (GUI: crash when pressing "delete" at the end of the name)

svn-id: r24113
This commit is contained in:
Max Horn 2006-10-04 17:13:48 +00:00
parent a66907e276
commit 03e70bf32b

View File

@ -110,9 +110,11 @@ bool EditableWidget::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
forcecaret = true;
break;
case 127: // delete
_editString.deleteChar(_caretPos);
if (_caretPos < (int)_editString.size()) {
_editString.deleteChar(_caretPos);
dirty = true;
}
forcecaret = true;
dirty = true;
break;
case 256 + 20: // left arrow
if (_caretPos > 0) {