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 d-a-v committed Sep 29, 2017
1 parent 92978a7 commit 47baf29
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 47baf29

Please sign in to comment.