(uxnasm.c) Add check for missing output file
This commit is contained in:
parent
798ebafdc8
commit
76732db18a
|
@ -498,10 +498,10 @@ int
|
|||
main(int argc, char *argv[])
|
||||
{
|
||||
FILE *src, *dst;
|
||||
if(argc == 1)
|
||||
return error("usage", "uxnasm [-v] input.tal output.rom");
|
||||
if(argv[1][0] == '-' && argv[1][1] == 'v')
|
||||
if(argc == 2 && argv[1][0] == '-' && argv[1][1] == 'v')
|
||||
return !fprintf(stdout, "Uxnasm - Uxntal Assembler, 27 Oct 2023.\n");
|
||||
if (argc != 3)
|
||||
return error("usage", "uxnasm [-v] input.tal output.rom");
|
||||
if(!(src = fopen(argv[1], "r")))
|
||||
return !error("Invalid input", argv[1]);
|
||||
if(!assemble(src))
|
||||
|
|
Loading…
Reference in New Issue