From a0f758009bcab8baaff0ba8aaf972445371c13b9 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 23 Jun 2021 17:18:20 +1000 Subject: Fix bitmask used to extract CPU identifier for CPUMeter When manipulating CPUMeters in the AvailableMeterPanel we use the bottom 16 bits to hold the CPU number. However, the bitmask used to extract the CPU number only masks the lower 8 bits (0xff). --- AvailableMetersPanel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c index cb67c7f3..22f2c5ef 100644 --- a/AvailableMetersPanel.c +++ b/AvailableMetersPanel.c @@ -45,7 +45,7 @@ static HandlerResult AvailableMetersPanel_eventHandler(Panel* super, int ch) { if (!selected) return IGNORED; - unsigned int param = selected->key & 0xff; + unsigned int param = selected->key & 0xffff; int type = selected->key >> 16; HandlerResult result = IGNORED; bool update = false; -- cgit v1.2.3