error on multiple output files

This commit is contained in:
sfja 2025-04-04 00:46:37 +02:00
parent 0b9398f015
commit 87abdd99c6

View File

@ -260,6 +260,12 @@ static inline Args parse_args(int argc, char** argv)
REPORTF_ERROR("%s", "no filename given to -o"); REPORTF_ERROR("%s", "no filename given to -o");
exit(1); exit(1);
} }
if (output_file != NULL) {
REPORTF_ERROR(
"multiple output filenames specified, original was '%s'",
output_file);
exit(1);
}
output_file = argv[i]; output_file = argv[i];
} else { } else {
if (input_file != NULL) { if (input_file != NULL) {