diff options
| author | Jeff Epler <jepler@gmail.com> | 2020-05-08 10:48:46 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@gmail.com> | 2020-06-22 10:24:21 -0500 |
| commit | de14b5b02f1ceebabca8f79c8e166e673f039aec (patch) | |
| tree | 1b11724d75ae9e366740eae6d2530932f1d7dabe /supervisor | |
| parent | 1504d9005d28ded268d2de5eb12d53dbac1bf179 (diff) | |
flash: Correctly signal error on invalid flash read
This logic was intended to mirror what is done for "write", but
the wrong variable name was repeated twice.
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/flash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/supervisor/shared/flash.c b/supervisor/shared/flash.c index 298e7d83e..9f52ddbc4 100644 --- a/supervisor/shared/flash.c +++ b/supervisor/shared/flash.c @@ -88,7 +88,7 @@ static void build_partition(uint8_t *buf, int boot, int type, uint32_t start_blo mp_uint_t flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t num_blocks) { if (block_num == 0) { - if (block_num > 1) { + if (num_blocks > 1) { return 1; // error } // fake the MBR so we can decide on our own partition table |
