Skip to content

Commit 8ae5b5f

Browse files
committed
Merge branch 'invalidated-string-move' of https://github.com/sandeepmistry/Arduino
2 parents 5e146c4 + 5dd628a commit 8ae5b5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/WString.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
193193
void String::move(String &rhs)
194194
{
195195
if (buffer) {
196-
if (capacity >= rhs.len) {
196+
if (rhs && capacity >= rhs.len) {
197197
strcpy(buffer, rhs.buffer);
198198
len = rhs.len;
199199
rhs.len = 0;

0 commit comments

Comments
 (0)