Commit 43b7fd1
committed
Don't mess with the original in String::substring
Before, substring would (temporarily) add a \0 in the original string at
the end of the substring, so the substring could be copied into a new
String object. However, now that the String::copy() method can work with
non-nul-terminated strings (by passing an explicit length), this trick
is not needed and we can just call the copy method instead.1 parent 555800b commit 43b7fd1
File tree
2 files changed
+2
-8
lines changed- hardware/arduino
- avr/cores/arduino
- sam/cores/arduino
2 files changed
+2
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 627 | + | |
631 | 628 | | |
632 | 629 | | |
633 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
| 629 | + | |
633 | 630 | | |
634 | 631 | | |
635 | 632 | | |
| |||
0 commit comments