Browse Source

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

Yuri D'Elia 3 years ago
parent
commit
c2e64c8c6e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Firmware/xflash_dump.cpp

+ 1 - 1
Firmware/xflash_dump.cpp

@@ -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();