mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 05:00:55 +01:00
Merge pull request #30 from szroland/master
incorrect buffer index used when processing longer writes
This commit is contained in:
commit
4c751657ab
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
if((len + next->om_len) > BLE_ATT_ATTR_MAX_LEN) {
|
||||||
return BLE_ATT_ERR_INVALID_ATTR_VALUE_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;
|
len += next->om_len;
|
||||||
next = SLIST_NEXT(next, om_next);
|
next = SLIST_NEXT(next, om_next);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue