Fix bug of emulated eeprom

This commit is contained in:
lokher 2023-08-22 12:00:28 +08:00
parent 619fe01bc3
commit 5ca4be13ed

View File

@ -523,7 +523,7 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
/* Check word alignment */
if (len && (uint32_t)src % 2) {
/* Read the unaligned first byte */
*dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src));
*dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src++));
--len;
}