From 0065cf3be99368b4af4673981e7bbb6fef56b52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= Date: Wed, 27 Jul 2011 22:55:31 +0200 Subject: [PATCH] Fix off-by-one error in form factor detection The keywords we are looking for are at odd positions. --- plugins/formfactor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/formfactor.c b/plugins/formfactor.c index 758d481c3..33a8b32cd 100644 --- a/plugins/formfactor.c +++ b/plugins/formfactor.c @@ -104,7 +104,7 @@ static int formfactor_probe(struct btd_adapter *adapter) return 0; } - formfactor = chassis_map[chassis_type * 2]; + formfactor = chassis_map[chassis_type * 2 + 1]; if (formfactor != NULL) { if (g_str_equal(formfactor, "laptop") == TRUE) minor |= (1 << 2) | (1 << 3); -- 2.47.3