skill calc: strip out non-digits characters

This commit is contained in:
Rolf Don
2020-02-21 01:07:44 +01:00
committed by GitHub
parent cf3fb89b1a
commit 8db7051206

View File

@@ -98,7 +98,7 @@ class UICalculatorInputArea extends JPanel
{ {
try try
{ {
return Integer.parseInt(field.getText()); return Integer.parseInt(field.getText().replaceAll("\\D", ""));
} }
catch (NumberFormatException e) catch (NumberFormatException e)
{ {