Skip to content

Commit

Permalink
Fix inverted check in TripodSlot
Browse files Browse the repository at this point in the history
`TripodSlot::valueOf` isn't actually used, but it was broken...
  • Loading branch information
MattSturgeon authored Dec 23, 2023
1 parent dfc475e commit fbe1be8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static boolean inRange(int number) {
}

public static TripodSlot valueOf(int number) throws IndexOutOfBoundsException {
if (inRange(number)) {
if (!inRange(number)) {
throw new IndexOutOfBoundsException("Cannot get TripodSlot for number %d: must be %d-%d.".formatted(number, MIN, MAX));
}
return valueOfUnsafe(number);
Expand Down

0 comments on commit fbe1be8

Please sign in to comment.