xfdump: fix another off-by-one static size check

This commit is contained in:
Yuri D'Elia 2021-06-08 19:08:03 +02:00
parent 378f239ff0
commit c2e64c8c6e

View file

@ -63,7 +63,7 @@ static void xfdump_dump_core(dump_header_t& hdr, uint32_t addr, uint8_t* buf, ui
xfdump_erase();
// write header
static_assert(sizeof(hdr) < 256, "header is larger than a single page write");
static_assert(sizeof(hdr) <= 256, "header is larger than a single page write");
xflash_enable_wr();
xflash_page_program(DUMP_OFFSET, (uint8_t*)&hdr, sizeof(hdr));
xflash_wait_busy();