1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-08 22:40:59 +00:00

fix(core/embed): fix firmware invalidation

[no changelog]
This commit is contained in:
cepetr 2024-09-19 16:52:18 +02:00 committed by cepetr
parent dfd17578b6
commit ab96ce7954

View File

@ -105,7 +105,7 @@ void firmware_invalidate_header(void) {
// erase start of the firmware (metadata) -> invalidate FW
ensure(flash_unlock_write(), NULL);
for (int i = 0; i < (1024 / FLASH_BLOCK_SIZE); i += FLASH_BLOCK_SIZE) {
for (int i = 0; i < (1024 / FLASH_BLOCK_SIZE); i++) {
flash_block_t data = {0};
ensure(flash_area_write_block(&FIRMWARE_AREA, i * FLASH_BLOCK_SIZE, data),
NULL);