pbap: fix parsing of returned phonebook size

This commit is contained in:
Matthias Ringwald 2018-08-20 21:17:23 +02:00
parent 6ff88f1f26
commit b9198f31a5

View File

@ -371,7 +371,7 @@ static void pbap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *
uint8_t len = data[i++]; uint8_t len = data[i++];
if (tag == PBAP_APPLICATION_PARAMETER_PHONEBOOK_SIZE && len == 2){ if (tag == PBAP_APPLICATION_PARAMETER_PHONEBOOK_SIZE && len == 2){
have_size = 1; have_size = 1;
phonebook_size = big_endian_read_16(data, 0); phonebook_size = big_endian_read_16(data, i);
} }
i+=len; i+=len;
} }