summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roi.c b/roi.c
index 0b2e372..31b6eb0 100644
--- a/roi.c
+++ b/roi.c
@@ -95,7 +95,7 @@ mark_matching_pixels(struct roi *roi, GdkPixbuf *image)
for (y = 0; y < height; ++y, row += stride) {
for (x = 0, p = row; x < width; ++x, p += nch) {
gboolean H = TRUE;
- for (i = 0; i < 3; ++i) {
+ for (i = 0; i < 3 && H; ++i) {
if (!(p[i] >= roi->interval[i].min &&
p[i] <= roi->interval[i].max))
H = FALSE;