Merge branch 'invalidated-string-move' of https://github.com/sandeepmistry/Arduino
This commit is contained in:
commit
86bfda76c4
|
@ -193,7 +193,7 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length)
|
|||
void String::move(String &rhs)
|
||||
{
|
||||
if (buffer) {
|
||||
if (capacity >= rhs.len) {
|
||||
if (rhs && capacity >= rhs.len) {
|
||||
strcpy(buffer, rhs.buffer);
|
||||
len = rhs.len;
|
||||
rhs.len = 0;
|
||||
|
|
Loading…
Reference in New Issue