Skip to content

Commit

Permalink
Update WString.cpp
Browse files Browse the repository at this point in the history
realloc() is called with newSize > 0 (at least 16), so newbuffer==0 means the old memory was not deallocated. Therefore, the pointer should still point to the old buffer. This change should resolve issue esp8266#3516.
  • Loading branch information
adams13x13 authored and igrr committed Sep 11, 2017
1 parent 2ffcb3e commit 613f04c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cores/esp8266/WString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
buffer = newbuffer;
return 1;
}
buffer = newbuffer;
return 0;
}

Expand Down

0 comments on commit 613f04c

Please sign in to comment.