diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index a517fb4..eb67caf 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
while (num_reports--) {
char addr[18];
le_advertising_info *info = frm->ptr;
+ int offset = 0;
p_ba2str(&info->bdaddr, addr);
printf("bdaddr %s (%s)\n", addr,
bdaddrtype2str(info->bdaddr_type));
- if (info->length > 0) {
- ext_inquiry_data_dump(level, frm,
- ((uint8_t *) &info->length) + 1);
+ while (offset < info->length) {
+ int eir_data_len = info->data[offset];
+
+ ext_inquiry_data_dump(level, frm, &info->data[offset]);
+
+ offset += eir_data_len + 1;
}
frm->ptr += LE_ADVERTISING_INFO_SIZE + info->length;