Commit 8ae5b5f4 authored by Cristian Maglie's avatar Cristian Maglie

Merge branch 'invalidated-string-move' of https://github.com/sandeepmistry/Arduino

parents 5e146c41 5dd628a2
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment