From de148376a52643d07b3b7966198356cd109bd38f Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Tue, 20 May 2025 23:57:30 +0100 Subject: [PATCH] closer to previous impl --- selfdrive/ui/installer/installer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/installer/installer.cc b/selfdrive/ui/installer/installer.cc index f3e299e1b6..4f2d7147a5 100644 --- a/selfdrive/ui/installer/installer.cc +++ b/selfdrive/ui/installer/installer.cc @@ -108,10 +108,10 @@ int executeGitCommand(const std::string &cmd) { int base = 0; for (const auto &[text, weight] : stages) { if (line.find(text) != std::string::npos) { - size_t percentPos = line.find('%'); + size_t percentPos = line.find("%"); if (percentPos != std::string::npos && percentPos >= 3) { int percent = std::stoi(line.substr(percentPos - 3, 3)); - int progress = base + (percent / 100.0f) * weight; + int progress = base + int(percent / 100. * weight); renderProgress(progress); } break;