Skip to content

Commit 217b894

Browse files
authored
Merge pull request #8565 from eightycc/fakembr
Fix off-by-one in flash block read with fake MBR
2 parents 2c25e82 + dc2dc9d commit 217b894

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

supervisor/shared/flash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ static mp_uint_t flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t n
105105
if (num_blocks > 1) {
106106
dest += 512;
107107
num_blocks -= 1;
108+
block_num += 1;
108109
// Fall through and do a read from flash.
109110
} else {
110111
return 0; // Done and ok.

0 commit comments

Comments
 (0)