Fix off-by-one in flash block read with fake MBR
This commit is contained in:
parent
2c25e82feb
commit
dc2dc9d058
@ -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) {
|
if (num_blocks > 1) {
|
||||||
dest += 512;
|
dest += 512;
|
||||||
num_blocks -= 1;
|
num_blocks -= 1;
|
||||||
|
block_num += 1;
|
||||||
// Fall through and do a read from flash.
|
// Fall through and do a read from flash.
|
||||||
} else {
|
} else {
|
||||||
return 0; // Done and ok.
|
return 0; // Done and ok.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user