diff --git a/cores/esp8266/WString.cpp b/cores/esp8266/WString.cpp index 4efba3e7d7..e21316379f 100644 --- a/cores/esp8266/WString.cpp +++ b/cores/esp8266/WString.cpp @@ -753,7 +753,7 @@ void String::trim(void) { end--; len = end + 1 - begin; if(begin > buffer) - memcpy(buffer, begin, len); + memmove(buffer, begin, len); buffer[len] = 0; }