From 9f0a35ee9b3ced561b9d6c0c5b60b477fa24459d Mon Sep 17 00:00:00 2001 From: rockingdice Date: Tue, 10 Jun 2025 16:34:12 -0500 Subject: [PATCH] fix: crash caused by cursor overflow * This fixes a crash that occurred when opening the soft keyboard for the second time --- .../Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs index 9183b6383..646651836 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs @@ -376,7 +376,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard bool cursorVisible = false; - if (state.CursorBegin != state.CursorEnd) + if (state.CursorBegin != state.CursorEnd && state.CursorEnd <= state.InputText.Length) { Debug.Assert(state.InputText.Length > 0);