summaryrefslogtreecommitdiffstats
path: root/AvailableMetersPanel.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-06-23 17:18:20 +1000
committerNathan Scott <nathans@redhat.com>2021-07-07 10:59:36 +1000
commita0f758009bcab8baaff0ba8aaf972445371c13b9 (patch)
tree126b46f5b298c98a13f667fbf5632883446e1e36 /AvailableMetersPanel.c
parent44d1200ca47d1ffb5b20a9da183b1e0b25bfb8f7 (diff)
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).
Diffstat (limited to 'AvailableMetersPanel.c')
-rw-r--r--AvailableMetersPanel.c2
1 files changed, 1 insertions, 1 deletions
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy