From 4210f5fc881cca393571b38a329ba9a7e4b29c81 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 21 Sep 2024 21:34:11 +0200 Subject: [PATCH] Fix missing core percentages, issue #792 --- src/btop_draw.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/btop_draw.cpp b/src/btop_draw.cpp index fbeb38a7..d1091cb9 100644 --- a/src/btop_draw.cpp +++ b/src/btop_draw.cpp @@ -814,10 +814,9 @@ namespace Cpu { int cx = 0, cy = 1, cc = 0, core_width = (b_column_size == 0 ? 2 : 3); if (Shared::coreCount >= 100) core_width++; for (const auto& n : iota(0, Shared::coreCount)) { - if (cmp_less(core_graphs.size(), n+1)) break; out += Mv::to(b_y + cy + 1, b_x + cx + 1) + Theme::c("main_fg") + (Shared::coreCount < 100 ? Fx::b + 'C' + Fx::ub : "") + ljust(to_string(n), core_width); - if (b_column_size > 0 or extra_width > 0) + if ((b_column_size > 0 or extra_width > 0) and cmp_less(n, core_graphs.size())) out += Theme::c("inactive_fg") + graph_bg * (5 * b_column_size + extra_width) + Mv::l(5 * b_column_size + extra_width) + core_graphs.at(n)(safeVal(cpu.core_percent, n), data_same or redraw);