From a484ce97fcdb8328771b108c29c39395e3b7eb4d Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Sat, 10 Feb 2024 18:31:29 +0800 Subject: [PATCH] makeDetailsMask() (int)prev->nCellsPainted (q11) --- Meter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Meter.c b/Meter.c index a1de7f539..bd5b65050 100644 --- a/Meter.c +++ b/Meter.c @@ -513,14 +513,14 @@ static uint16_t GraphMeterMode_makeDetailsMask(const GraphColorComputeState* pre assert(blanksAtTopCell < 8); blanksAtEnd = (uint8_t)blanksAtTopCell; roundsUpInAscii = true; - } else if (prev->nCellsPainted == 0 || prevTopPoint <= prev->nCellsPainted) { + } else if (prev->nCellsPainted == 0 || prevTopPoint <= (double)(int)prev->nCellsPainted) { blanksAtEnd = (uint8_t)maxBlanks % 8; } else { // Unlike other conditions, this one rounds to nearest for visual reason. // In case of a tie, display the dot at lower position of the graph, // i.e. MSB of the "details" data. - double distance = prevTopPoint - prev->nCellsPainted; + double distance = prevTopPoint - (double)(int)prev->nCellsPainted; distance = distance + rem * 0.5; // Tiebreaking direction that may be needed in the ASCII display mode.