diff --git a/Core/src/main/java/updater/CheckUpdate.java b/Core/src/main/java/updater/CheckUpdate.java index 1bc2afab7..618dd344c 100644 --- a/Core/src/main/java/updater/CheckUpdate.java +++ b/Core/src/main/java/updater/CheckUpdate.java @@ -42,8 +42,12 @@ public static boolean isUpdateAvailable() { String[] currentVersionPartsString = CURRENT_VERSION.split("\\."); String[] latestVersionPartsString = latestVersion.split("\\."); for (int i = 0; i < 3; i++) { - if (Integer.parseInt(currentVersionPartsString[i]) < Integer.parseInt(latestVersionPartsString[i])) { - return true; + try { + if (Integer.parseInt(currentVersionPartsString[i]) < Integer.parseInt(latestVersionPartsString[i])) { + return true; + } + } catch (NumberFormatException e) { + M.msgUpdateError("Failed to parse version number! " + e.getMessage()); } } return false;