Fix EEPROM::begin missing underscore

Added size validation to the EEPROM begin, but forgot to set the class
variable with the new adjusted size.
Fixes #10
parent d51511f6
......@@ -40,7 +40,7 @@ void EEPROMClass::begin(size_t size) {
size = 4096;
}
size = (size + 255) & (~255); // Flash writes limited to 256 byte boundaries
_size = (size + 255) & (~255); // Flash writes limited to 256 byte boundaries
// In case begin() is called a 2nd+ time, don't reallocate if size is the same
if (_data && size != _size) {
......
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