fde95cf5b5
When checking the `left` argument, it previously allowed having left == len. However, this means the substring starts one past the last character in the string and should return the empty string. In practice, this already worked correctly, because buffer[len] contains the trailing nul, so it would (re)assign the empty string to `out`. However, fixing this check makes it a bit more logical, and prevents a fairly unlikely out-of-buffer write (to address 0x0) when calling substring on an invalidated String: String bar = (char*)NULL; bar.substring(0, 0); |
||
---|---|---|
bootloaders | ||
cores/arduino | ||
firmwares | ||
libraries | ||
variants | ||
boards.txt | ||
platform.txt | ||
programmers.txt |