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:
parent
ad0a85b31b
commit
1c3c229fad
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue