Fixed issue with no-output
This commit is contained in:
parent
c7ef5230b4
commit
c7d3a410ab
2
makefile
2
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
|
||||
|
|
|
@ -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.");
|
||||
|
|
Loading…
Reference in New Issue