diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-08-29 14:32:55 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-08-29 14:32:55 +0000 |
commit | c04e0056db8c4a8dc02b87fb647e300b26ccb207 (patch) | |
tree | 1cb9568c3c677736f1c036844c44c7b8fd81b937 /src | |
parent | 1160385cf5604689c14d73397d11a0ca1edfcbe7 (diff) |
Fix supported commands bit calculation
Diffstat (limited to 'src')
-rw-r--r-- | src/hci.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -515,7 +515,7 @@ char *hci_commandstostr(uint8_t *commands, char *pref, int width) m = commands_map; while (m->str) { - if (hci_test_bit(m->val, commands)) + if (commands[m->val / 8] & (1 << (m->val % 8))) size += strlen(m->str) + (pref ? strlen(pref) : 0) + 3; m++; } @@ -534,7 +534,7 @@ char *hci_commandstostr(uint8_t *commands, char *pref, int width) m = commands_map; while (m->str) { - if (hci_test_bit(m->val, commands)) { + if (commands[m->val / 8] & (1 << (m->val % 8))) { if (strlen(off) + strlen(m->str) > width - 3) { ptr += sprintf(ptr, "\n%s", pref ? pref : ""); off = ptr; |