diff options
-rw-r--r-- | output/outcoff.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/output/outcoff.c b/output/outcoff.c index b27cc94e..22cb3e88 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -674,16 +674,16 @@ void AddExport(char *name) strcpy(newS->String, name); if (rvp == NULL) { int i; - for (i = 0; i < nsects; i++) + for (i = 0; i < nsects; i++) { if (!strcmp(EXPORT_SECTION_NAME, sects[i]->name)) break; + } + if (i == nsects) - directive_sec = - sects[coff_make_section - (EXPORT_SECTION_NAME, EXPORT_SECTION_FLAGS)]; - else - directive_sec = sects[i]; + i = coff_make_section(EXPORT_SECTION_NAME, EXPORT_SECTION_FLAGS); + + directive_sec = sects[i]; Exports = newS; } else { while (rvp->Next) { |