未验证 提交 f3902467 编写于 作者: S snosrap 提交者: GitHub

Don't convert to null-terminated string prior to writeValue (#4473)

fixes: #4472
上级 f7fb0063
......@@ -535,7 +535,7 @@ std::string BLERemoteCharacteristic::toString() {
* @return N/A.
*/
void BLERemoteCharacteristic::writeValue(std::string newValue, bool response) {
writeValue((uint8_t*)newValue.c_str(), strlen(newValue.c_str()), response);
writeValue((uint8_t*)newValue.data(), newValue.length(), response);
} // writeValue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册