Avoid overflow for very large ROMs (e.g. TPP1)

This commit is contained in:
Rangi
2026-07-15 22:57:25 -04:00
parent ba4a7f2e6a
commit 4ada3e85d8
+2 -2
View File
@@ -529,11 +529,11 @@ static void writeMapSummary() {
fprintf(
mapFile,
"\t%s: %" PRIu32 " byte%s used / %" PRIu32 " free",
"\t%s: %" PRIu32 " byte%s used / %zu free",
sectionTypeInfo[type].name.c_str(),
usedTotal,
usedTotal == 1 ? "" : "s",
nbBanks * sectionTypeInfo[type].size - usedTotal
static_cast<size_t>(nbBanks) * sectionTypeInfo[type].size - usedTotal
);
if (sectionTypeInfo[type].firstBank != sectionTypeInfo[type].lastBank || nbBanks > 1) {
fprintf(mapFile, " in %u bank%s", nbBanks, nbBanks == 1 ? "" : "s");