From 1c3c229fad7e5c1c09b34f382f121b8d74b152f6 Mon Sep 17 00:00:00 2001 From: jduncanator Date: Mon, 18 Nov 2019 10:32:06 +1100 Subject: [PATCH] am: Check for a max length of zero We should only limit/truncate text when the max length is set to a non-zero value. --- .../HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 8d0a6bb0a6..0c374125f1 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -61,6 +61,11 @@ namespace Ryujinx.HLE.HOS.Applets _textValue = DEFAULT_NUMB; } + if (_keyboardConfig.StringLengthMax == 0) + { + _keyboardConfig.StringLengthMax = 100; + } + if (_textValue.Length > _keyboardConfig.StringLengthMax) { _textValue = _textValue.Substring(0, (int)_keyboardConfig.StringLengthMax);