From b095515238aa7a64fe903b7926bf7f470ad61b7c Mon Sep 17 00:00:00 2001 From: LongHairedHacker Date: Sun, 13 Feb 2022 16:18:04 +0100 Subject: [PATCH] Update step needs a lower bound --- src/decoder.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/decoder.rs b/src/decoder.rs index 6cf90cb..7a36643 100644 --- a/src/decoder.rs +++ b/src/decoder.rs @@ -175,7 +175,11 @@ where } let line_count = pixel_count / PIXELS_PER_LINE; - update_step = line_count / update_steps; + update_step = if line_count / update_steps > 4 { + line_count / update_steps + } else { + 4 + } } }