mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-20 13:54:33 +00:00
Explicitly assume what was verified earlier by readSection
This commit is contained in:
@@ -270,6 +270,7 @@ static void placeSection(Section §ion) {
|
||||
assignSection(section, location);
|
||||
|
||||
// Update the free space
|
||||
assume(section.org + section.size <= UINT16_MAX);
|
||||
uint16_t sectionEnd = section.org + section.size;
|
||||
bool noLeftSpace = freeSpace.address == section.org;
|
||||
bool noRightSpace = freeSpace.address + freeSpace.size == sectionEnd;
|
||||
|
||||
@@ -181,6 +181,7 @@ static void
|
||||
}
|
||||
|
||||
// Output the section itself
|
||||
assume(section->size == section->data.size());
|
||||
fwrite(section->data.data(), 1, section->size, outputFile);
|
||||
offset += section->size;
|
||||
|
||||
@@ -473,6 +474,7 @@ static void writeMapBank(SortedSections const §List, SectionType type, uint3
|
||||
|
||||
writeEmptySpace(prevEndAddr, sect.org);
|
||||
|
||||
assume(sect.org + sect.size <= UINT16_MAX);
|
||||
prevEndAddr = sect.org + sect.size;
|
||||
|
||||
fprintf(mapFile, "\tSECTION: $%04" PRIx16, sect.org);
|
||||
|
||||
Reference in New Issue
Block a user