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 was about to tell you the same thing :-)
Indeed, printf() is a legacy of the C language and knows nothing about String and classes in general.
I don't know why they decided to integrate it into ESP32's core.
This gives an SSOSIZE of 12 + 4 - 1 = 15, enough room for 14 characters and the terminator.
So, in theory, 14-character strings should have worked too, but there is an off-by-one error in the length comparison that decides whether to use SSO or not:
if (maxStrLen < sizeof(sso.buff) - 1)
It should be <= instead of <; that's why SSO doesn't work with 14-character strings.
Describe the issue
I'm trying to read some texts out of my JSON file but when strings become longer than 13 characters I just get data junk.
Troubleshooter report
Here is the report generated by the ArduinoJson Troubleshooter:
Well, I'm out of ideas: you need to talk to a human.
Environment
Here is the environment that I'm using':
Reproduction
Here is a small snippet that demonstrate the problem.
Program output
If relevant, include the program output.
Expected output:
Actual output:
Printing the value of
Serial.printf("%d\n", ArduinoJson::detail::StringNode::maxLength);
returns255
as expected.The text was updated successfully, but these errors were encountered: