From c7d3a410ab1ac4c32290584ab8f43b0a5d81547a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 25 Feb 2024 17:36:33 -0800 Subject: [PATCH] Fixed issue with no-output --- makefile | 2 +- src/uxnasm.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/makefile b/makefile index e007864..6d59e68 100644 --- a/makefile +++ b/makefile @@ -17,7 +17,7 @@ test: bin/uxnasm bin/uxncli bin/uxn11 @ ./bin/uxnasm -v && ./bin/uxncli -v && ./bin/uxn11 -v @ ./bin/uxnasm etc/opctest.tal bin/opctest.rom @ ./bin/uxncli bin/opctest.rom -install: bin/uxnasm bin/uxncli bin/uxn11 +install: all bin/uxnasm bin/uxncli bin/uxn11 @ cp bin/uxn11 bin/uxnasm bin/uxncli ~/bin/ uninstall: @ rm -f ~/bin/uxn11 ~/bin/uxnasm ~/bin/uxncli diff --git a/src/uxnasm.c b/src/uxnasm.c index 3b902cc..d1dcf09 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -520,9 +520,7 @@ main(int argc, char *argv[]) return !error("Invalid input", argv[1]); if(!assemble(src)) return !error("Assembly", "Failed to assemble rom."); - if(scmp(argv[2], "-", 2)) - dst = stdout; - else if(!(dst = fopen(argv[2], "wb"))) + if(!(dst = fopen(argv[2], "wb"))) return !error("Invalid Output", argv[2]); if(p.length <= TRIM) return !error("Assembly", "Output rom is empty.");