From 9f6d0d295836a7d3cdc862bd882a54257b90677e Mon Sep 17 00:00:00 2001 From: lbernstone Date: Sat, 7 Jul 2018 01:19:44 -0700 Subject: [PATCH] EEPROM.readstring was returning an extra character (#1609) --- libraries/EEPROM/EEPROM.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/EEPROM/EEPROM.cpp b/libraries/EEPROM/EEPROM.cpp index bc83dbcb..1138ecff 100644 --- a/libraries/EEPROM/EEPROM.cpp +++ b/libraries/EEPROM/EEPROM.cpp @@ -296,9 +296,9 @@ String EEPROMClass::readString (int address) if (address + len > _size) return String(0); - char value[len + 1]; + char value[len]; memcpy((uint8_t*) value, _data + address, len); - value[len + 1] = 0; + value[len] = 0; return String(value); }