Merge pull request #30 from szroland/master

incorrect buffer index used when processing longer writes
This commit is contained in:
h2zero 2020-08-20 09:25:30 -06:00 committed by GitHub
commit 4c751657ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -240,7 +240,7 @@ int NimBLECharacteristic::handleGapEvent(uint16_t conn_handle, uint16_t attr_han
if((len + next->om_len) > BLE_ATT_ATTR_MAX_LEN) {
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
}
memcpy(&buf[len-1], next->om_data, next->om_len);
memcpy(&buf[len], next->om_data, next->om_len);
len += next->om_len;
next = SLIST_NEXT(next, om_next);
}