We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f60defc commit 4bd7b4dCopy full SHA for 4bd7b4d
cores/esp8266/WString.cpp
@@ -258,7 +258,7 @@ String &String::operator =(String &&rval) noexcept {
258
}
259
260
String &String::operator =(const char *cstr) {
261
- if (cstr)
+ if (cstr && cstr[0])
262
copy(cstr, strlen(cstr));
263
else
264
invalidate();
cores/esp8266/WString.h
@@ -88,7 +88,7 @@ class String {
88
return buffer() ? len() : 0;
89
90
void clear(void) {
91
- setLen(0);
+ invalidate();
92
93
bool isEmpty(void) const {
94
return length() == 0;
0 commit comments