From a4d19efb930690af099ed805a38a70192d5d86ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20La=C3=ADns?= Date: Mon, 9 Sep 2019 17:08:39 +0100 Subject: [PATCH] hidpp20: fix reading cluster info in the 8071 feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TBH I don't know why I wrote the original code in the first place, it clearly doesn't follow the spec. Signed-off-by: Filipe LaĆ­ns --- src/hidpp20.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hidpp20.c b/src/hidpp20.c index 9a43edb7..37ea2799 100644 --- a/src/hidpp20.c +++ b/src/hidpp20.c @@ -1082,8 +1082,8 @@ hidpp20_rgb_effects_get_cluster_info(struct hidpp20_device *device, info->effect_index = msg.msg.parameters[1]; info->location = get_unaligned_be_u16(&msg.msg.parameters[2]); - info->num_effects = get_unaligned_be_u16(&msg.msg.parameters[4]); - info->persistency_caps = get_unaligned_be_u16(&msg.msg.parameters[6]); + info->num_effects = msg.msg.parameters[4]; + info->persistency_caps = msg.msg.parameters[5]; return 0; }