Closed drmpf closed 3 years ago
Thanks for your contribution, sounds like useful things to fix indeed.
However, the development of the String class currently happens at https://github.com/arduino/ArduinoCore-API. The AVR core does note make use of the repository yet, but it should do so in the future, so any changes to the String class should be made there. Maybe you could check if this issue exists in that repo and maybe submit a fix there if it does?
As for the actual changes, some remarks:
Thanks for the pointer to the ArduinoCore-API. You are correct about the strcpy, bad merge on my part should have been commented out. Yes the fix you noted removes the need for my memmove The float/double to string conversion has a fix committed there also. So my change also may not needed except perhaps the nan/inf handling.
This patch fixes String memory corruption due to str +=str; and String(1.0,40); // and similar were result exceeds the local buf[33]