From 906871a181a22b3307da881dd51dac0284a17c91 Mon Sep 17 00:00:00 2001 From: Robert Heller Date: Fri, 7 Oct 2022 14:29:07 -0400 Subject: [PATCH] Lpc17xx40xx eeprom emulation hassert bug (#664) Fix HASSERT bug in Lpc17xx40xxEEPROMEmulation.cxx (change < to <=). --- src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx index 92c950c73..cf075701e 100644 --- a/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx +++ b/src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx @@ -124,7 +124,7 @@ void LpcEEPROMEmulation::flash_program( { HASSERT(relative_sector < sectorCount_); HASSERT((byte_count % BLOCK_SIZE) == 0); - HASSERT(start_block + (byte_count / BLOCK_SIZE) < rawBlockCount_); + HASSERT(start_block + (byte_count / BLOCK_SIZE) <= rawBlockCount_); auto* address = get_block(relative_sector, start_block); /* make sure we have the correct frequency */