Skip to content

Commit d024bea

Browse files
authored
No need to move 0-termination char in String::move
1 parent 7948954 commit d024bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/WString.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void String::move(String &rhs) {
242242
// Use case: When 'reserve()' was called and the first
243243
// assignment/append is the return value of a function.
244244
if (rhs.len() && rhs.buffer()) {
245-
memmove(wbuffer(), rhs.buffer(), rhs.length() + 1);
245+
memmove(wbuffer(), rhs.buffer(), rhs.length());
246246
}
247247
setLen(rhs.len());
248248
rhs.invalidate();

0 commit comments

Comments
 (0)