forked from h2zero/esp-nimble-cpp
[Client] Fix for truncation of strings with null in writeValue std::string overload
This commit is contained in:
1 parent
7815d89dbf
commit
30d6c399b8
1 file changed
+1
-1
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user