From eb2b7c184232cc227a591ac67de45ba022fbe114 Mon Sep 17 00:00:00 2001 From: Rangi Date: Tue, 25 Aug 2026 15:02:44 -0400 Subject: [PATCH] A 1GB ROM does not have "more than 65536 banks" --- src/fix/fix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fix/fix.cpp b/src/fix/fix.cpp index 47b461a0..05a2e58b 100644 --- a/src/fix/fix.cpp +++ b/src/fix/fix.cpp @@ -251,9 +251,9 @@ static void error("\"%s\" has more than 65536 banks", name); // LCOV_EXCL_LINE }; static constexpr off_t NB_BANKS_LIMIT = 0x10000; - static_assert(NB_BANKS_LIMIT * BANK_SIZE <= SSIZE_MAX, "Max input file size too large for OS"); + static_assert(NB_BANKS_LIMIT * BANK_SIZE < SSIZE_MAX, "Max input file size too large for OS"); if (input == output) { - if (fileSize >= NB_BANKS_LIMIT * BANK_SIZE) { + if (fileSize > NB_BANKS_LIMIT * BANK_SIZE) { return errorTooLarge(); // LCOV_EXCL_LINE } // Compute number of banks and ROMX len from file size