You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the documentation at readthedocs and the issue is not addressed there.
I have tested that the issue is present in current master branch (aka latest git).
I have searched the issue tracker for a similar issue.
If there is a stack dump, I have decoded it.
I have filled out all fields below.
Platform
Hardware: NodeMCU1.0
Core Version: 2.5.2 release
Development Env: Arduino IDE
Operating System: Windows 10
Settings in IDE
Module: NodeMCU1.0
Flash Mode: dio
Flash Size: 4MB/1MB
lwip Variant: v2 Lower Memory
Reset Method: nodemcu
Flash Frequency: 40Mhz
CPU Frequency: 160MHz
Upload Using: SERIAL
Upload Speed: 921600
Problem Description
Depending on the length of WString::replace, replaced string actual length may be 1 byte redundant.
The result of the MCVE sketch will output to the serial monitor as below:
@Hieromon, the String short string optimization was changed recently. Could you try your app with GIT head and see if it fixes things? The test case you've give passes, but I'll see about adding it and some more to the CI suite.
@earlephilhower, I confirmed that WString::replace works correctly with the recent GIT with more shorter strings to make sure. They are replaced correctly.
Thank you for your quick response.
Basic Infos
Platform
Settings in IDE
Problem Description
Depending on the length of WString::replace, replaced string actual length may be 1 byte redundant.
The result of the MCVE sketch will output to the serial monitor as below:
The last character will be garbage.
MCVE Sketch
The text was updated successfully, but these errors were encountered: