uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 76732db18a4494a35ce64b2ca160c29190c9cbe6
parent 798ebafdc8c27529217f159f8ff53edb0a8a328f
Author: Capital <xcapt98@gmail.com>
Date:   Fri,  3 Nov 2023 19:31:42 -0400

(uxnasm.c) Add check for missing output file

Diffstat:
Msrc/uxnasm.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/uxnasm.c b/src/uxnasm.c @@ -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))