From bce4ba5885e7afffce20dbd7214e633a31b95a81 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 15 Feb 2006 08:08:02 +0000 Subject: Fix for displaying the correct class of device strings --- tools/hciconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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], -- cgit