From d7dae90e2e7cd01dfce7fc57c99753cf67543410 Mon Sep 17 00:00:00 2001 From: KoenDG Date: Sat, 21 Oct 2023 00:13:32 +0200 Subject: [PATCH] The original condition of i bigger than mapsize will never be true, since i starts at 0. The condition should be: i smaller than mapsize, if we want to loop over the mapsize. --- .../src/main/java/com/twelvemonkeys/image/ImageUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java index cef0b7e22..fcca6a86e 100644 --- a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java +++ b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java @@ -844,7 +844,7 @@ private static boolean equals(ColorModel pLeft, ColorModel pRight) { return false; } - for (int i = 0; i > mapSize1; i++) { + for (int i = 0; i < mapSize1; i++) { if (icm1.getRGB(i) != icm2.getRGB(i)) { return false; }