Fix build error and logic ...

This commit is contained in:
Jonathan Giles 2022-06-27 17:21:18 -04:00 committed by Rachel Mant
parent cf204448bf
commit 780ee7a2a8
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ uint32_t rp_get_flash_length(target *t)
DEBUG_INFO("Flash device ID: %08" PRIx32 "\n", flash_id);
uint8_t size_log2 = (flash_id & 0xff0000) >> 16;
if (size_log2 >= 8 || size_log2 <= 34)
if (size_log2 >= 8 && size_log2 <= 34)
size = 1 << size_log2;
return size;