Skip to content

Commit

Permalink
Fix global config crash (#144)
Browse files Browse the repository at this point in the history
No idea what that feature even is, but fixed
  • Loading branch information
KnightMiner committed Dec 15, 2019
1 parent e1e140a commit fe34c82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/knightminer/inspirations/common/Config.java
Expand Up @@ -648,8 +648,12 @@ private static String updateConfig(String line, String t, String f) {
* @return Config version
*/
private static double getConfigVersion() {
String version = configFile.getLoadedConfigVersion();
if(version == null) {
return Double.NaN;
}
try {
return Double.parseDouble(configFile.getLoadedConfigVersion());
return Double.parseDouble(version);
} catch (NumberFormatException e) {
return Double.NaN;
}
Expand Down

0 comments on commit fe34c82

Please sign in to comment.