mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-19 18:40:44 +01:00
wscutil: Fix subcategory string lookup
The device type category array is indexed by the category ID so if we're skipping i == 0 in the iteration, we should also skip the 0'th element in device_type_categories.
This commit is contained in:
parent
fab764967b
commit
975696c5e0
@ -3031,7 +3031,7 @@ bool wsc_device_type_to_dbus_str(const struct wsc_primary_device_type *val,
|
|||||||
bool wsc_device_type_from_subcategory_str(struct wsc_primary_device_type *out,
|
bool wsc_device_type_from_subcategory_str(struct wsc_primary_device_type *out,
|
||||||
const char *subcategory_str)
|
const char *subcategory_str)
|
||||||
{
|
{
|
||||||
struct device_type_category_info *cat = device_type_categories;
|
struct device_type_category_info *cat = device_type_categories + 1;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 1; i < L_ARRAY_SIZE(device_type_categories); i++, cat++) {
|
for (i = 1; i < L_ARRAY_SIZE(device_type_categories); i++, cat++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user