1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

SPIFFS: fix unaligned read in HAL (#3261)

Ref. #3065
This commit is contained in:
Ivan Grokhotkov 2017-05-21 10:30:03 -05:00 committed by GitHub
parent 4812cae8e2
commit f211014dd3

View File

@ -60,7 +60,7 @@ int32_t spiffs_hal_read(uint32_t addr, uint32_t size, uint8_t *dst) {
__LINE__, addr, size, alignedBegin, alignedEnd);
return SPIFFS_ERR_INTERNAL;
}
memcpy(dst, &tmp + 4 - nb, nb);
memcpy(dst, ((uint8_t*) &tmp) + 4 - nb, nb);
}
if (alignedEnd != alignedBegin) {