Skip to content

Add Small String Optimization #5690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 8, 2019
Merged
4 changes: 2 additions & 2 deletions cores/esp8266/StreamString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
size_t StreamString::write(const uint8_t *data, size_t size) {
if(size && data) {
if(reserve(length() + size + 1)) {
memcpy((void *) (buffer + len), (const void *) data, size);
memcpy((void *) (wbuffer() + len), (const void *) data, size);
len += size;
*(buffer + len) = 0x00; // add null for string end
*(wbuffer() + len) = 0x00; // add null for string end
return size;
}
}
Expand Down
Loading