Merge pull request #8565 from eightycc/fakembr
Fix off-by-one in flash block read with fake MBR
This commit is contained in:
commit
217b894057
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user