Skip to content

Commit

Permalink
Fixed invalid config values defaulting to zero rather than default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Jul 17, 2023
1 parent e81c846 commit 342fadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/coreprotect/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private int getInt(final String key, final int dfl) {

configured = configured.replaceAll("[^0-9]", "");

return configured.isEmpty() ? 0 : Integer.parseInt(configured);
return configured.isEmpty() ? dfl : Integer.parseInt(configured);
}

private String getString(final String key) {
Expand Down

0 comments on commit 342fadd

Please sign in to comment.