• Earle F. Philhower, III's avatar
    StreamString SSO fix (#2736) · bd57ff4a
    Earle F. Philhower, III authored
    As found by @mongozmaki in https://github.com/esp8266/Arduino/pull/6035
    
    With SSO implementation in String, StreamString::write generates wrong
    strings under some circumstances.  Reason is that String::len() returns
    strlen(sso_buf) if SSO=true but with newly written data
    (in StreamString::write) the null-termination missing at the time len()
    is called.
    
    Furthermore, len() is called twice which is inefficient if SSO=true.
    bd57ff4a
StreamString.cpp 1.7 KB