pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/esp8266/Arduino/commit/2843a5ace10eb696f19c9d754be7bbf6331046b5

backport #7491 · esp8266/Arduino@2843a5a · GitHub
Skip to content

Commit 2843a5a

Browse files
committed
backport #7491
1 parent 1cdec7b commit 2843a5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cores/esp8266/Esp.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,16 @@ static SpiFlashOpResult spi_flash_write_puya(uint32_t offset, uint32_t *data, si
697697
} else {
698698
bytesLeft = 0;
699699
}
700-
rc = spi_flash_read(pos, flash_write_puya_buf, bytesNow);
700+
size_t bytesAligned = (bytesNow + 3) & ~3;
701+
rc = spi_flash_read(pos, flash_write_puya_buf, bytesAligned);
701702
if (rc != SPI_FLASH_RESULT_OK) {
702703
return rc;
703704
}
704-
for (size_t i = 0; i < bytesNow / 4; ++i) {
705+
for (size_t i = 0; i < bytesAligned / 4; ++i) {
705706
flash_write_puya_buf[i] &= *ptr;
706707
++ptr;
707708
}
708-
rc = spi_flash_write(pos, flash_write_puya_buf, bytesNow);
709+
rc = spi_flash_write(pos, flash_write_puya_buf, bytesAligned);
709710
pos += bytesNow;
710711
}
711712
return rc;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy