hfp_ag: fix HFP_SUBEVENT_PLACE_CALL_WITH_NUMBER

This commit is contained in:
Matthias Ringwald 2021-04-13 10:38:00 +02:00
parent de52f4be9a
commit 13ee9fd7ed

View File

@ -408,7 +408,7 @@ void hfp_emit_string_event(hfp_connection_t * hfp_connection, uint8_t event_subt
event[2] = event_subtype;
little_endian_store_16(event, 3, hfp_connection->acl_handle);
uint16_t size = btstack_min(strlen(value), sizeof(event) - 6);
strncpy((char*)&event[3], value, size);
strncpy((char*)&event[5], value, size);
event[5 + size] = 0;
hfp_emit_event_for_context(hfp_connection, event, sizeof(event));
}