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 */ /* Check word alignment */
if (len && (uint32_t)src % 2) { if (len && (uint32_t)src % 2) {
/* Read the unaligned first byte */ /* Read the unaligned first byte */
*dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src)); *dest++ = EEPROM_ReadDataByte((const uintptr_t)((uint16_t *)src++));
--len; --len;
} }