Fix to actually allow one-past-the-end zero-sized sections in linker scripts

This commit is contained in:
ISSOtm
2026-09-17 10:19:47 -04:00
committed by Rangi
parent b9b5c9a2b4
commit 960f82126f
2 changed files with 2 additions and 8 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ void layout_SetAddr(uint32_t addr) {
if (uint16_t &pc = curAddr[activeType][activeBankIdx]; addr < pc) {
scriptError("Cannot decrease the current address (from $%04x to $%04x)", pc, addr);
} else if (addr > typeInfo.endAddr()) { // Allow "one past the end" sections.
} else if (addr > typeInfo.endAddr() + 1u) { // Allow "one past the end" zero-sized sections.
scriptError(
"Cannot set the current address to $%04" PRIx32 ": %s ends at $%04" PRIx16,
addr,