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.
This commit is contained in:
jduncanator 2019-11-18 10:32:06 +11:00
parent ad0a85b31b
commit 1c3c229fad

View file

@ -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);