Skip to content

Commit f1310c0

Browse files
Make String reallocation warning more descriptive (#8131)
Fixes #8130
1 parent 52be27d commit f1310c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/WString.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ bool String::changeBuffer(unsigned int maxStrLen) {
182182
#ifdef DEBUG_ESP_OOM
183183
if (!isSSO() && capacity() >= OOM_STRING_THRESHOLD_REALLOC_WARN && maxStrLen > capacity()) {
184184
// warn when badly re-allocating
185-
DEBUGV("[offending String op %d->%d ('%." STR(OOM_STRING_BORDER_DISPLAY) "s ... %." STR(OOM_STRING_BORDER_DISPLAY) "s')]\n",
185+
DEBUGV("[String] Reallocating large String(%d -> %d bytes) '%." STR(OOM_STRING_BORDER_DISPLAY) "s ... %." STR(OOM_STRING_BORDER_DISPLAY) "s'\n",
186186
len(), maxStrLen, c_str(),
187187
len() > OOM_STRING_BORDER_DISPLAY? c_str() + std::max((int)len() - OOM_STRING_BORDER_DISPLAY, OOM_STRING_BORDER_DISPLAY): "");
188188
}

0 commit comments

Comments
 (0)