From 780ee7a2a875f06b3df56f5d090c806b9b3527b4 Mon Sep 17 00:00:00 2001 From: Jonathan Giles Date: Mon, 27 Jun 2022 17:21:18 -0400 Subject: [PATCH] Fix build error and logic ... --- src/target/rp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/rp.c b/src/target/rp.c index 1e33b1a..712338e 100644 --- a/src/target/rp.c +++ b/src/target/rp.c @@ -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;