Merge pull request #965 from cremno/mrbc-multiple-outfiles-mem-leak

mrbc: exit if "-o" is specified multiple times
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-03-07 15:25:11 -08:00
+6
View File
@@ -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':