Skip to content

Commit

Permalink
Fix compare crash bug
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Jan 6, 2025
1 parent 1e50a21 commit bbd5b08
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,8 @@ class AwtRoboCanvas(width: Int, height: Int, filled: Boolean, bufferedImageType:
val diffImage = BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB)
for (x in 0 until width) {
for (y in 0 until height) {
if (x >= originalImage.width || y >= originalImage.height) {
if (x >= originalImage.width || y >= originalImage.height
|| x >= comparedImage.width || y >= comparedImage.height) {
diffImage.setRGB(x, y, -0x10000)
continue
}
Expand Down

0 comments on commit bbd5b08

Please sign in to comment.