mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-22 21:57:07 +00:00
Fix incorrect EMPTY space in .map files (#2119)
This commit is contained in:
+5
-4
@@ -468,11 +468,12 @@ static void writeMapBank(SortedSections const §List, SectionType type, uint3
|
||||
uint16_t prevEndAddr = sectionTypeInfo[type].startAddr;
|
||||
uint16_t used = forEachSection(sectList, [&](Section const §) {
|
||||
assume(sect.offset == 0);
|
||||
|
||||
writeEmptySpace(prevEndAddr, sect.org);
|
||||
|
||||
assume(sect.org + sect.size <= UINT16_MAX);
|
||||
prevEndAddr = sect.org + sect.size;
|
||||
|
||||
if (uint16_t endAddr = sect.org + sect.size; endAddr > prevEndAddr) {
|
||||
writeEmptySpace(prevEndAddr, sect.org);
|
||||
prevEndAddr = endAddr;
|
||||
}
|
||||
|
||||
fprintf(mapFile, "\tSECTION: $%04" PRIx16, sect.org);
|
||||
if (sect.size != 0) {
|
||||
|
||||
Reference in New Issue
Block a user