Skip to content

Commit

Permalink
Fix for mapfiles and symfiles. Before, you couldn't define a mapfile …
Browse files Browse the repository at this point in the history
…unless you also defined a symfile. If you did, it would segfault.
  • Loading branch information
stag019 committed Jan 1, 2015
1 parent 513d451 commit 116569f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/link/mapfile.c
Expand Up @@ -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;
Expand Down

0 comments on commit 116569f

Please sign in to comment.