diff --git a/app/src/main/java/info/nightscout/utils/SafeParse.java b/app/src/main/java/info/nightscout/utils/SafeParse.java index ff749f732b..7d6d890b0e 100644 --- a/app/src/main/java/info/nightscout/utils/SafeParse.java +++ b/app/src/main/java/info/nightscout/utils/SafeParse.java @@ -11,6 +11,7 @@ public class SafeParse { public static Double stringToDouble(String input) { Double result = 0d; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0d; try { @@ -24,6 +25,7 @@ public class SafeParse { public static Integer stringToInt(String input) { Integer result = 0; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0; try { @@ -37,6 +39,7 @@ public class SafeParse { public static Long stringToLong(String input) { Long result = 0L; input = input.replace(",", "."); + input = input.replace("−", "-"); if (input.equals("")) return 0L; try {