Fix limit bug with scan gauge

This commit is contained in:
Armel FAUVEAU committed 2026-04-25 05:09:32 +02:00
1 parent 4fa821e15f
commit 09a5e3c1e7
1 file changed
+1 -1
+1 -1
View File
@@ -222,7 +222,7 @@ static void ScanProgress_DrawGaugeLine(uint8_t line, uint32_t current_index, uin
else if (current_index > total)
current_index = total;
head_col = ((current_index - 1) * fill_cols) / total;
head_col = (total <= 1) ? (fill_cols - 1) : ((current_index - 1) * (fill_cols - 1)) / (total - 1);
if (head_col >= fill_cols)
head_col = fill_cols - 1;