From a2ff2029d82e298d95634ec577da426cb1c6609d Mon Sep 17 00:00:00 2001 From: Axel Kappel <69117984+Kl4rry@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:01:56 +0200 Subject: [PATCH] fix zero sized mosaic tiles crash --- src/app/image_view/mosaic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/image_view/mosaic.rs b/src/app/image_view/mosaic.rs index eb9a5e0..90cd8fa 100644 --- a/src/app/image_view/mosaic.rs +++ b/src/app/image_view/mosaic.rs @@ -42,7 +42,7 @@ impl Mosaic { let end_x = ((x + 1) * limit).min(image.width()); let end_y = ((y + 1) * limit).min(image.height()); - if end_x.saturating_sub(start_x) == 0 || end_x.saturating_sub(start_x) == 0 { + if end_x.saturating_sub(start_x) == 0 || end_y.saturating_sub(start_y) == 0 { continue; }