8000 Fix EEPROM::begin missing underscore · weimingtom/arduino-pico@9976d63 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9976d63

Browse files
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 earlephilhower#10
1 parent d51511f commit 9976d63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/EEPROM/EEPROM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void EEPROMClass::begin(size_t size) {
4040
size = 4096;
4141
}
4242

43-
size = (size + 255) & (~255); // Flash writes limited to 256 byte boundaries
43+
_size = (size + 255) & (~255); // Flash writes limited to 256 byte boundaries
4444

4545
// In case begin() is called a 2nd+ time, don't reallocate if size is the same
4646
38EE if (_data && size != _size) {

0 commit comments

Comments
 (0)
0