File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2564,7 +2564,7 @@ static void do_extract_cd(parameters_map ¶ms)
2564
2564
2565
2565
// split path and extension
2566
2566
int chop = default_name.find_last_of (' .' );
2567
- if (chop != - 1 )
2567
+ if (chop != std::string::npos )
2568
2568
default_name.erase (chop, default_name.size ());
2569
2569
2570
2570
// GDIs will always output as split bin
@@ -2600,13 +2600,16 @@ static void do_extract_cd(parameters_map ¶ms)
2600
2600
output_bin_file_str = output_bin_file_fnd->second ;
2601
2601
2602
2602
chop = (*output_bin_file_str).find_last_of (' .' );
2603
- if (chop != - 1 )
2603
+ if (chop != std::string::npos )
2604
2604
{
2605
2605
output_bin_file_ext = (*output_bin_file_str).substr (chop, (*output_bin_file_str).size () - chop);
2606
2606
(*output_bin_file_str).erase (chop, (*output_bin_file_str).size ());
2607
2607
}
2608
2608
}
2609
2609
2610
+ if ((*output_bin_file_str).find (' "' ) != std::string::npos)
2611
+ report_error (1 , " Output bin filename (%s) must not contain quotation marks" , *output_bin_file_str);
2612
+
2610
2613
// print some info
2611
2614
util::stream_format (std::cout, " Input CHD: %s\n " , *params.find (OPTION_INPUT)->second );
2612
2615
util::stream_format (std::cout, " Output TOC: %s\n " , *output_file_str->second );
You can’t perform that action at this time.
0 commit comments