diff options
author | Sandeep Mistry <s.mistry@arduino.cc> | 2016-07-12 17:29:13 -0400 |
---|---|---|
committer | Sandeep Mistry <s.mistry@arduino.cc> | 2016-07-12 17:29:13 -0400 |
commit | 5dd628a2c29a0e077405970b778bf41264b030dd (patch) | |
tree | 058dc5d2802a2e7a394d674d7305da632dc8001d /cores | |
parent | 2717fbe05bf6341dd79acebdfccc9ffd5e2b1223 (diff) |
Make String::move of an invalidated String result in an invalidated String
Diffstat (limited to 'cores')
-rw-r--r-- | cores/arduino/WString.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index cd3e0e8..9975303 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -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; |