From 116569f54d6464421278c96d4ae638787e7d305a Mon Sep 17 00:00:00 2001 From: stag019 Date: Thu, 1 Jan 2015 01:20:29 -0500 Subject: [PATCH] Fix for mapfiles and symfiles. Before, you couldn't define a mapfile unless you also defined a symfile. If you did, it would segfault. --- src/link/mapfile.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/link/mapfile.c b/src/link/mapfile.c index 1264d7c3..20ea256a 100644 --- a/src/link/mapfile.c +++ b/src/link/mapfile.c @@ -72,14 +72,13 @@ MapfileInitBank(SLONG bank) void MapfileWriteSection(struct sSection * pSect) { - if (!mf && !sf) - return; - SLONG i; - fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes)\n", - pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1, - pSect->nByteSize); + if (mf) { + fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes)\n", + pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1, + pSect->nByteSize); + } for (i = 0; i < pSect->nNumberOfSymbols; i += 1) { struct sSymbol *pSym;