Commit 9f6d0d29 authored by lbernstone's avatar lbernstone Committed by Me No Dev

EEPROM.readstring was returning an extra character (#1609)

parent 9efecc1b
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment