Skip to content

Commit dc2dc9d

Browse files
author
Bob Abeles
committed
Fix off-by-one in flash block read with fake MBR
1 parent 2c25e82 commit dc2dc9d

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)