diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-02-15 08:08:02 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-02-15 08:08:02 +0000 |
commit | bce4ba5885e7afffce20dbd7214e633a31b95a81 (patch) | |
tree | 77141097dfbd3846b412004bc8e79a7ab3784794 /tools/hciconfig.c | |
parent | 4009a83023b266dd0cfa3fd5b9cba7d02dae944a (diff) |
Fix for displaying the correct class of device strings
Diffstat (limited to 'tools/hciconfig.c')
-rw-r--r-- | tools/hciconfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 703bdbd8..d641d09c 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -676,7 +676,7 @@ static void cmd_class(int ctl, int hdev, char *opt) } else printf("Unspecified"); printf("\n\tDevice Class: "); - if ((cls[1] & 0x1f) > sizeof(*major_devices)) + if ((cls[1] & 0x1f) >= sizeof(major_devices) / sizeof(*major_devices)) printf("Invalid Device Class!\n"); else printf("%s, %s\n", major_devices[cls[1] & 0x1f], |