Fix off-by-one in flash block read with fake MBR

This commit is contained in:
Bob Abeles 2023-11-06 08:24:41 -08:00
parent 2c25e82feb
commit dc2dc9d058
1 changed files with 1 additions and 0 deletions

View File

@ -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.