8000 flash: Correctly signal error on invalid flash read · adafruit/circuitpython@56541cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 56541cf

Browse files
committed
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.
1 parent 6a5ab57 commit 56541cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supervisor/shared/flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void build_partition(uint8_t *buf, int boot, int type, uint32_t start_blo
8888

8989
mp_uint_t flash_read_blocks(uint8_t *dest, uint32_t block_num, uint32_t num_blocks) {
9090
if (block_num == 0) {
91-
if (block_num > 1) {
91+
if (num_blocks > 1) {
9292
return 1; // error
9393
}
9494
// fake the MBR so we can decide on our own partition table

0 commit comments

Comments
 (0)
0