diff options
| -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 a0a3b6c..e4bed03 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -691,7 +691,7 @@ void String::remove(unsigned int index){  void String::remove(unsigned int index, unsigned int count){  	if (index >= len) { return; }  	if (count <= 0) { return; } -	if (index + count > len) { count = len - index; } +	if (count > len - index) { count = len - index; }  	char *writeTo = buffer + index;  	len = len - count;  	strncpy(writeTo, buffer + index + count,len - index); | 
