mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-29 01:55:17 +00:00
A 1GB ROM does not have "more than 65536 banks"
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user