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

Browse filesBrowse files
lbernstoneme-no-dev
authored andcommitted
EEPROM.readstring was returning an extra character (espressif#1609)
1 parent 9efecc1 commit 9f6d0d2
Copy full SHA for 9f6d0d2

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎libraries/EEPROM/EEPROM.cpp

Copy file name to clipboardExpand all lines: libraries/EEPROM/EEPROM.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ String EEPROMClass::readString (int address)
296296
if (address + len > _size)
297297
return String(0);
298298

299-
char value[len + 1];
299+
char value[len];
300300
memcpy((uint8_t*) value, _data + address, len);
301-
value[len + 1] = 0;
301+
value[len] = 0;
302302
return String(value);
303303
}
304304

0 commit comments

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