mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2025-07-31 02:47:13 +02:00
[Client] Fix for truncation of strings with null in writeValue std::string overload
This commit is contained in:
@ -712,7 +712,7 @@ std::string NimBLERemoteCharacteristic::toString() {
|
|||||||
* @return false if not connected or cant perform write for some reason.
|
* @return false if not connected or cant perform write for some reason.
|
||||||
*/
|
*/
|
||||||
bool NimBLERemoteCharacteristic::writeValue(const std::string &newValue, bool response) {
|
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
|
} // writeValue
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user