diff --git a/src/asm/section.c b/src/asm/section.c index cfee4726..a498256e 100644 --- a/src/asm/section.c +++ b/src/asm/section.c @@ -117,6 +117,9 @@ static struct Section *getSection(char const *pzName, enum SectionType type, pzName, org, startaddr[type], endaddr(type)); } + if (nbbanks(type) == 1) + bank = bankranges[type][0]; + struct Section *pSect = out_FindSectionByName(pzName); if (pSect) { @@ -137,9 +140,6 @@ static struct Section *getSection(char const *pzName, enum SectionType type, if (pSect->pzName == NULL) fatalerror("Not enough memory for sectionname"); - if (nbbanks(type) == 1) - bank = bankranges[type][0]; - pSect->nType = type; pSect->nPC = 0; pSect->nOrg = org;