From 245c095da74d8ad89b698ea6c8c556b4a49fd1b7 Mon Sep 17 00:00:00 2001 From: Cremno Date: Thu, 7 Mar 2013 19:45:57 +0100 Subject: mrbc: exit if outfile is specified multiple times --- tools/mrbc/mrbc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/mrbc/mrbc.c b/tools/mrbc/mrbc.c index bc551fffc..698586ec0 100644 --- a/tools/mrbc/mrbc.c +++ b/tools/mrbc/mrbc.c @@ -83,6 +83,12 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct _args *args) switch ((*argv)[1]) { case 'o': + if (outfile) { + printf("%s: An output file is already specified. (%s)\n", + *origargv, outfile); + result = -5; + goto exit; + } outfile = get_outfilename((*argv) + 2, ""); break; case 'B': -- cgit v1.2.3