From 164c8654b9f883d879c39b92c08dc9c5146ac3d9 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 20 Mar 2025 15:29:45 +0100 Subject: [PATCH] fix: off-by-one due to <= instead of < --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 3e3cc60..575b851 100644 --- a/src/main.c +++ b/src/main.c @@ -44,7 +44,7 @@ int32_t main(int32_t argc, char** argv) { char const* const cpu_set_log = "set cpu %i to %hi\n"; for (int32_t id = 1; id < mcpus; id++) { // start at CPU 1, as CPU 0 is not writeable - if (id <= ncpus) { + if (id < ncpus) { if (cpu_setter(id, true, opts) && (opts & OPT_VERBOSE)) printf(cpu_set_log, id, 1); continue;