diff options
author | Cristian Maglie <c.maglie@arduino.cc> | 2016-07-18 18:30:23 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@arduino.cc> | 2016-07-18 18:30:23 +0200 |
commit | 8ae5b5f43be7a7627ef6565ac8a92fc0b1f2b196 (patch) | |
tree | 90d3b1f9e646dabceb7aec4474b2b91f4181e559 /cores/arduino | |
parent | 5e146c415d4b3e9006e21a94428a86320316aaf2 (diff) | |
parent | 5dd628a2c29a0e077405970b778bf41264b030dd (diff) |
Merge branch 'invalidated-string-move' of https://github.com/sandeepmistry/Arduino
Diffstat (limited to 'cores/arduino')
-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; |