shithub: rgbds

Download patch

ref: 92b2ac3c8c47a9de73dad12bfeebf1ed25c92523
parent: 0e67298dffd2bf338e22f6a40bbc768804ffd8f9
author: rlewicki <[email protected]>
date: Tue Oct 25 19:38:03 EDT 2022

Remove duplicated EMPTY label in case no bank memory is used

--- a/src/link/output.c
+++ b/src/link/output.c
@@ -479,11 +479,11 @@
 
 	uint16_t bankEndAddr = sectionTypeInfo[type].startAddr + sectionTypeInfo[type].size;
 
-	writeEmptySpace(prevEndAddr, bankEndAddr);
-
 	if (used == 0) {
 		fputs("\tEMPTY\n\n", mapFile);
 	} else {
+		writeEmptySpace(prevEndAddr, bankEndAddr);
+
 		uint16_t slack = sectionTypeInfo[type].size - used;
 
 		fprintf(mapFile, "\tTOTAL EMPTY: $%04" PRIx16 " byte%s\n\n", slack,