Skip to content

Commit

Permalink
fix zero sized mosaic tiles crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl4rry committed Oct 22, 2024
1 parent b4a7213 commit a2ff202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/image_view/mosaic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a2ff202

Please sign in to comment.