Skip to content

Commit

Permalink
Lpc17xx40xx eeprom emulation hassert bug (#664)
Browse files Browse the repository at this point in the history
Fix HASSERT bug in Lpc17xx40xxEEPROMEmulation.cxx (change < to <=).
  • Loading branch information
RobertPHeller authored Oct 7, 2022
1 parent 5325117 commit 906871a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/freertos_drivers/nxp/Lpc17xx40xxEEPROMEmulation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 906871a

Please sign in to comment.