mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-22 19:10:46 +01:00
[Client] Fix for truncation of strings with null in writeValue std::string overload
This commit is contained in:
parent
7815d89dbf
commit
30d6c399b8
1 changed files with 1 additions and 1 deletions
|
@ -712,7 +712,7 @@ std::string NimBLERemoteCharacteristic::toString() {
|
|||
* @return false if not connected or cant perform write for some reason.
|
||||
*/
|
||||
bool NimBLERemoteCharacteristic::writeValue(const std::string &newValue, bool response) {
|
||||
return writeValue((uint8_t*)newValue.c_str(), strlen(newValue.c_str()), response);
|
||||
return writeValue((uint8_t*)newValue.c_str(), newValue.length(), response);
|
||||
} // writeValue
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue