Skip to content

Commit

Permalink
fix: Check for sanitize height ranges
Browse files Browse the repository at this point in the history
Fixes #18
  • Loading branch information
FlashyReese committed Nov 16, 2023
1 parent 87e8afd commit 625e9fe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ private static MinMaxEntry parseMinMaxEntryNegative(String str) {
int k = parseInt(stripBrackets(strings[1]), Integer.MIN_VALUE);

if (j != Integer.MIN_VALUE && k != Integer.MIN_VALUE) {
return new MinMaxEntry(j, k);
int min = Math.min(j, k);
int max = Math.max(j, k);
return new MinMaxEntry(min, max);
}
}
} else {
Expand Down

0 comments on commit 625e9fe

Please sign in to comment.