Skip to content

Commit

Permalink
Fix OOB
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Jun 22, 2023
1 parent 25f585c commit 5fe5ccc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Image tagImage(SavegameInfo<Vic2Tag> info, Vic2Tag tag) {
public Pane createIcon() {
var icon = GameImage.getGameIcon(Game.VIC2);
var cut = ImageHelper.cut(icon,
new Rectangle2D(125, 0, icon.getWidth() - 240, icon.getHeight()));
new Rectangle2D(125, 0, Math.max(0, icon.getWidth() - 240), Math.max(0, icon.getHeight())));
return GameImage.imageNode(cut, GuiStyle.CLASS_IMAGE_ICON);
}

Expand Down

0 comments on commit 5fe5ccc

Please sign in to comment.