Skip to content

Commit

Permalink
Avoid int overflow when using fillr in negative coords
Browse files Browse the repository at this point in the history
 - default to a depth of "radius"
 - Fixes #1667
  • Loading branch information
dordsor21 authored and NotMyFault committed Apr 23, 2022
1 parent f2df511 commit 5d16998
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public int fillr(
//FAWE end
radius = Math.max(1, radius);
we.checkMaxRadius(radius);
depth = depth == null ? Integer.MAX_VALUE : Math.max(1, depth);
depth = depth == null ? (int) radius : Math.max(1, depth);
we.checkMaxRadius(radius);

BlockVector3 pos = session.getPlacementPosition(actor);
Expand Down

0 comments on commit 5d16998

Please sign in to comment.