mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-06 19:08:12 +03:00
fix String bug
length where returning something that is not 0 while buffer where NULL!?
This commit is contained in:
@@ -121,6 +121,7 @@ ICACHE_FLASH_ATTR String::~String() {
|
||||
if(buffer) {
|
||||
free(buffer);
|
||||
}
|
||||
init();
|
||||
}
|
||||
|
||||
// /*********************************************/
|
||||
@@ -136,8 +137,7 @@ inline void String::init(void) {
|
||||
void ICACHE_FLASH_ATTR String::invalidate(void) {
|
||||
if(buffer)
|
||||
free(buffer);
|
||||
buffer = NULL;
|
||||
capacity = len = 0;
|
||||
init();
|
||||
}
|
||||
|
||||
unsigned char ICACHE_FLASH_ATTR String::reserve(unsigned int size) {
|
||||
|
Reference in New Issue
Block a user