diff options
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 f494094..dcd469d 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -619,7 +619,7 @@ String String::substring(unsigned int left, unsigned int right) const left = temp; } String out; - if (left > len) return out; + if (left >= len) return out; if (right > len) right = len; char temp = buffer[right]; // save the replaced character buffer[right] = '\0'; |