From 4d15e6d58f64b08b3746c340b948091cd38e27c2 Mon Sep 17 00:00:00 2001 From: claudiol Date: Thu, 7 Mar 2019 12:35:30 -0500 Subject: [PATCH] Fixed but in CFI data read --- flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flash.c b/flash.c index 13ab2b5..09035cd 100644 --- a/flash.c +++ b/flash.c @@ -140,7 +140,7 @@ flash_get_halfword(x49gp_flash_t *flash, uint32_t offset) break; case FLASH_STATE_CFI_QUERY: - if (offset < flash->cfi_size) { + if ( (offset>>1) < flash->cfi_size) { data = flash->cfi_data[offset >> 1]; } else { data = 0x0000;