hfp_hf: fix len field for number and alpha fields

This commit is contained in:
Matthias Ringwald 2022-05-24 15:51:12 +02:00
parent 07a44c5e7c
commit a45da34ed9

View File

@ -166,11 +166,11 @@ static void hfp_hf_emit_type_number_alpha(const hfp_connection_t * hfp_connectio
little_endian_store_16(event, 3, hfp_connection->acl_handle);
pos += 2;
event[pos++] = hfp_connection->bnip_type;
event[pos++] = bnip_number_len;
event[pos++] = bnip_number_len + 1;
memcpy(&event[7], hfp_connection->bnip_number, bnip_number_len);
pos += bnip_number_len;
event[pos++] = 0;
event[pos++] = alpha_len;
event[pos++] = alpha_len + 1;
memcpy(&event[pos], hfp_connection->line_buffer, alpha_len);
pos += alpha_len;
event[pos++] = 0;