mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #965 from cremno/mrbc-multiple-outfiles-mem-leak
mrbc: exit if "-o" is specified multiple times
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user