From c26755624daf363a65ea6ce234a3160094da8df2 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 22 Jun 2017 21:17:46 +0200 Subject: [PATCH] Fix the id string offset Since commit 344bfab229a17c7227b9bec02f616505a8d9e998 only a subset of the id string is used to detect the model. But because the offset was never updated, the model detection always fails now. --- src/cochran_commander.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cochran_commander.c b/src/cochran_commander.c index d2c47b0..83dd14a 100644 --- a/src/cochran_commander.c +++ b/src/cochran_commander.c @@ -207,7 +207,7 @@ cochran_commander_get_model (cochran_commander_device_t *device) unsigned int model = 0xFFFFFFFF; for (unsigned int i = 0; i < C_ARRAY_SIZE(models); ++i) { - if (memcmp (device->id + 0x3B, models[i].id, sizeof(models[i].id) - 1) == 0) { + if (memcmp (device->id + 0x3D, models[i].id, sizeof(models[i].id) - 1) == 0) { model = models[i].model; break; }