diff options
| author | Cremno <[email protected]> | 2013-03-07 19:45:57 +0100 |
|---|---|---|
| committer | Cremno <[email protected]> | 2013-03-07 19:45:57 +0100 |
| commit | 245c095da74d8ad89b698ea6c8c556b4a49fd1b7 (patch) | |
| tree | 8ee77bd853fb6e88277dd46b84ffb59bd801693f /tools | |
| parent | 7d47096434994d9eb9712546879e3b52b04d3443 (diff) | |
| download | mruby-245c095da74d8ad89b698ea6c8c556b4a49fd1b7.tar.gz mruby-245c095da74d8ad89b698ea6c8c556b4a49fd1b7.zip | |
mrbc: exit if outfile is specified multiple times
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/mrbc/mrbc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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': |
