Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6591f5b

Browse filesBrowse files
authored
Fix replace() failing (espressif#6224)
1 parent 0ea485e commit 6591f5b
Copy full SHA for 6591f5b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎cores/esp32/WString.cpp

Copy file name to clipboardExpand all lines: cores/esp32/WString.cpp
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,9 +774,10 @@ void String::replace(const String& find, const String& replace) {
774774
}
775775
if(size == len())
776776
return;
777-
if(size > capacity() && !changeBuffer(size))
777+
if(size > capacity() && !changeBuffer(size)) {
778778
log_w("String.Replace() Insufficient space to replace string");
779779
return;
780+
}
780781
int index = len() - 1;
781782
while(index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
782783
readFrom = wbuffer() + index + find.len();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.