Skip to content

Commit 4322d61

Browse files
committed
Fix argument check
Zero arguments should trigger an error as should files which fail the is_goto_binary check when a single file is specified.
1 parent b81ca84 commit 4322d61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/goto-bmc/goto_bmc_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int goto_bmc_parse_optionst::doit()
3838

3939
api_sessiont api{api_options};
4040

41-
if(cmdline.args.size() > 1 && !api.is_goto_binary(cmdline.args[0]))
41+
if(cmdline.args.size() != 1 || !api.is_goto_binary(cmdline.args[0]))
4242
{
4343
log.error() << "Please give exactly one binary file" << messaget::eom;
4444
return CPROVER_EXIT_INCORRECT_TASK;

0 commit comments

Comments
 (0)