From 2e68c0b916a4fb72c70b2fac2f7c25c8fb45b75b Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 20 May 2023 17:27:20 +0200 Subject: [PATCH] Fixed key > gpu_names check --- src/btop_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/btop_input.cpp b/src/btop_input.cpp index f27cea9..d816bf5 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -273,7 +273,7 @@ namespace Input { atomic_wait(Runner::active); Config::current_preset = -1; auto key_i = std::stoi(key); - if (key_i-4u >= Gpu::gpu_names.size()) return; + if (std::cmp_greater(key_i-4, Gpu::gpu_names.size())) return; Config::toggle_box(std::string("gpu") + (char)((key_i == 0 ? 10 : (key_i-5)) + '0')); Draw::calcSizes(); Runner::run("all", false, true);