mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-05 12:42:22 +03:00
EEPROM: round requested size to 4 byte boundary (#659)
This commit is contained in:
@ -44,6 +44,8 @@ void EEPROMClass::begin(size_t size) {
|
|||||||
if (size > SPI_FLASH_SEC_SIZE)
|
if (size > SPI_FLASH_SEC_SIZE)
|
||||||
size = SPI_FLASH_SEC_SIZE;
|
size = SPI_FLASH_SEC_SIZE;
|
||||||
|
|
||||||
|
size = (size + 3) & (~3);
|
||||||
|
|
||||||
if (_data) {
|
if (_data) {
|
||||||
delete[] _data;
|
delete[] _data;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user