Fix for mapfiles and symfiles. Before, you couldn't define a mapfile unless you also defined a symfile. If you did, it would segfault.

This commit is contained in:
stag019
2015-01-01 01:20:29 -05:00
parent 513d451710
commit 116569f54d

View File

@@ -72,14 +72,13 @@ MapfileInitBank(SLONG bank)
void void
MapfileWriteSection(struct sSection * pSect) MapfileWriteSection(struct sSection * pSect)
{ {
if (!mf && !sf)
return;
SLONG i; SLONG i;
if (mf) {
fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes)\n", fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes)\n",
pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1, pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1,
pSect->nByteSize); pSect->nByteSize);
}
for (i = 0; i < pSect->nNumberOfSymbols; i += 1) { for (i = 0; i < pSect->nNumberOfSymbols; i += 1) {
struct sSymbol *pSym; struct sSymbol *pSym;