aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java
index 221b5023..54636791 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Calculator.java
@@ -117,7 +117,7 @@ public class Calculator {
token.tokenLength = 1;
token.type = TokenType.LPAREN;
token.operatorValue = "(";
- } else if ('.' == c) {
+ } else if ('.' == c || ',' == c) {
token.tokenLength = 1;
token.type = TokenType.NUMBER;
readDigitsInto(token, source, true);
@@ -129,7 +129,7 @@ public class Calculator {
readDigitsInto(token, source, false);
if (i + token.tokenLength < source.length()) {
char p = source.charAt(i + token.tokenLength);
- if ('.' == p) {
+ if ('.' == p || ',' == p) {
token.tokenLength++;
readDigitsInto(token, source, true);
}