Skip to content

Commit 613f04c

Browse files
adams13x13igrr
authored andcommitted
Update WString.cpp
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 #3516.
1 parent 2ffcb3e commit 613f04c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

cores/esp8266/WString.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ unsigned char String::changeBuffer(unsigned int maxStrLen) {
159159
buffer = newbuffer;
160160
return 1;
161161
}
162-
buffer = newbuffer;
163162
return 0;
164163
}
165164

0 commit comments

Comments
 (0)