Fixed bug that checked the wrong buffer size when inserting UUID information into an advertisement payload.

pull/10638/head
George Beckstein 2019-05-22 15:55:56 -04:00
parent 1dbb478bbb
commit 4598a28cb7
1 changed files with 1 additions and 1 deletions

View File

@ -498,7 +498,7 @@ ble_error_t AdvertisingDataBuilder::setUUIDData(
size_t old_size = getFieldSize(shortType) + getFieldSize(longType);
/* if we can't fit the new data do not proceed */
if (new_size > data.size() - (_payload_length - old_size)) {
if (new_size > _buffer.size() - (_payload_length - old_size)) {
return BLE_ERROR_BUFFER_OVERFLOW;
}