shithub: rgbds

Download patch

ref: 5bca1172ffb910566ccdf97fcd8d6a4c98ade456
parent: 136446fccb5412ccc70cd2331a5ea0c7d369af35
author: ISSOtm <[email protected]>
date: Thu Mar 19 19:07:07 EDT 2020

Fix section continuation when only one bank exists

--- a/src/asm/section.c
+++ b/src/asm/section.c
@@ -117,6 +117,9 @@
 				pzName, org, startaddr[type], endaddr(type));
 	}
 
+	if (nbbanks(type) == 1)
+		bank = bankranges[type][0];
+
 	struct Section *pSect = out_FindSectionByName(pzName);
 
 	if (pSect) {
@@ -136,9 +139,6 @@
 	pSect->pzName = strdup(pzName);
 	if (pSect->pzName == NULL)
 		fatalerror("Not enough memory for sectionname");
-
-	if (nbbanks(type) == 1)
-		bank = bankranges[type][0];
 
 	pSect->nType = type;
 	pSect->nPC = 0;