Skip to content

Commit

Permalink
Merge pull request #8565 from eightycc/fakembr
Browse files Browse the repository at this point in the history
Fix off-by-one in flash block read with fake MBR
  • Loading branch information
dhalbert authored Nov 6, 2023
2 parents 2c25e82 + dc2dc9d commit 217b894
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions supervisor/shared/flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static mp_uint_t flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t n
if (num_blocks > 1) {
dest += 512;
num_blocks -= 1;
block_num += 1;
// Fall through and do a read from flash.
} else {
return 0; // Done and ok.
Expand Down

0 comments on commit 217b894

Please sign in to comment.