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 af23d0b

Browse filesBrowse files
Bmooijme-no-dev
authored andcommitted
Return empty string instead of "0" (espressif#2673)
1 parent 582e643 commit af23d0b
Copy full SHA for af23d0b

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎libraries/EEPROM/src/EEPROM.cpp

Copy file name to clipboardExpand all lines: libraries/EEPROM/src/EEPROM.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ size_t EEPROMClass::readString (int address, char* value, size_t maxLen)
286286
String EEPROMClass::readString (int address)
287287
{
288288
if (address < 0 || address > _size)
289-
return String(0);
289+
return String();
290290

291291
uint16_t len;
292292
for (len = 0; len <= _size; len++)
293293
if (_data[address + len] == 0)
294294
break;
295295

296296
if (address + len > _size)
297-
return String(0);
297+
return String();
298298

299299
char value[len];
300300
memcpy((uint8_t*) value, _data + address, len);

0 commit comments

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