From 84edfb3d885e84f7ca8e02c3db11ca29718a8e3f Mon Sep 17 00:00:00 2001 From: daid Date: Tue, 3 Nov 2020 13:33:02 +0100 Subject: [PATCH] Update output.c --- src/asm/output.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/asm/output.c b/src/asm/output.c index 0d04d7e8..4e7585f3 100644 --- a/src/asm/output.c +++ b/src/asm/output.c @@ -472,11 +472,10 @@ static void registerExportedSymbol(struct Symbol *symbol, void *arg) void out_WriteObject(void) { FILE *f; - if (strcmp(tzObjectname, "-") != 0) { + if (strcmp(tzObjectname, "-") != 0) f = fopen(tzObjectname, "wb"); - } else { + else f = fdopen(1, "wb"); - } if (!f) err(1, "Couldn't write file '%s'", tzObjectname);