Browse Source

Fixed regex of version string parsing

TfT_02 12 years ago
parent
commit
f1b82dcbe6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/java/net/h31ix/updater/Updater.java

+ 2 - 2
src/main/java/net/h31ix/updater/Updater.java

@@ -398,8 +398,8 @@ public class Updater {
             String[] oldTokens = version.split("-");
             String[] newTokens = title.split("-");
 
-            int oldVersion = Integer.parseInt(oldTokens[0].replaceAll(".", ""));
-            int newVersion = Integer.parseInt(newTokens[0].replaceAll(".", ""));
+            int oldVersion = Integer.parseInt(oldTokens[0].replaceAll("[.]", ""));
+            int newVersion = Integer.parseInt(newTokens[0].replaceAll("[.]", ""));
 
             // Check versions
             if (oldVersion < newVersion) {