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 9fe34f6

Browse filesBrowse files
Resolve WString TODO (#6190)
Resolve TODO (XXX) by logging warning message.
1 parent cbeb7c4 commit 9fe34f6
Copy full SHA for 9fe34f6

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎cores/esp32/WString.cpp

Copy file name to clipboardExpand all lines: cores/esp32/WString.cpp
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <Arduino.h>
2525
#include "WString.h"
2626
#include "stdlib_noniso.h"
27+
#include "esp32-hal-log.h"
2728

2829
/*********************************************/
2930
/* Constructors */
@@ -774,7 +775,8 @@ void String::replace(const String& find, const String& replace) {
774775
if(size == len())
775776
return;
776777
if(size > capacity() && !changeBuffer(size))
777-
return; // XXX: tell user!
778+
log_w("String.Replace() Insufficient space to replace string");
779+
return;
778780
int index = len() - 1;
779781
while(index >= 0 && (index = lastIndexOf(find, index)) >= 0) {
780782
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.