From 87abdd99c6a0da25fc708acc72dfcd30de439b8e Mon Sep 17 00:00:00 2001 From: sfja Date: Fri, 4 Apr 2025 00:46:37 +0200 Subject: [PATCH] error on multiple output files --- asm/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/asm/main.c b/asm/main.c index 071d23d..e2e0737 100644 --- a/asm/main.c +++ b/asm/main.c @@ -260,6 +260,12 @@ static inline Args parse_args(int argc, char** argv) REPORTF_ERROR("%s", "no filename given to -o"); exit(1); } + if (output_file != NULL) { + REPORTF_ERROR( + "multiple output filenames specified, original was '%s'", + output_file); + exit(1); + } output_file = argv[i]; } else { if (input_file != NULL) {