mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 07:43:01 +01:00
Fix slight mistake with cursor position when using delete.
This commit is contained in:
@@ -430,7 +430,7 @@ void osinterface_process_messages()
|
|||||||
gTextInputCursorPosition--;
|
gTextInputCursorPosition--;
|
||||||
gTextInputLength--;
|
gTextInputLength--;
|
||||||
}
|
}
|
||||||
if (e.key.keysym.sym == SDLK_DELETE && gTextInputLength > 0 && gTextInput && gTextInputCursorPosition != text_input_max_length){
|
if (e.key.keysym.sym == SDLK_DELETE && gTextInputLength > 0 && gTextInput && gTextInputCursorPosition != gTextInputLength){
|
||||||
memmove(gTextInput + gTextInputCursorPosition, gTextInput + gTextInputCursorPosition + 1, text_input_max_length - gTextInputCursorPosition - 1);
|
memmove(gTextInput + gTextInputCursorPosition, gTextInput + gTextInputCursorPosition + 1, text_input_max_length - gTextInputCursorPosition - 1);
|
||||||
gTextInput[text_input_max_length - 1] = '\0';
|
gTextInput[text_input_max_length - 1] = '\0';
|
||||||
gTextInputLength--;
|
gTextInputLength--;
|
||||||
|
|||||||
Reference in New Issue
Block a user