1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 15:33:05 +08:00

Allow only number characters parseable by int.TryParse

char.IsNumber() is too broad, allowing full width and other numbers.
This commit is contained in:
Susko3 2021-12-07 20:06:22 +01:00
parent 74db8da11b
commit 0b0ff36154

View File

@ -67,7 +67,7 @@ namespace osu.Game.Overlays.Settings
private class OutlinedNumberBox : OutlinedTextBox
{
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
protected override bool CanAddCharacter(char character) => character >= '0' && character <= '9';
public new void NotifyInputError() => base.NotifyInputError();
}