Skip to content

Commit ad7b3da

Browse files
committed
Account for negative indices
1 parent 4ad4278 commit ad7b3da

File tree

1 file changed

+1
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+1
-1
lines changed

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def cmd_services(*args)
587587
end
588588
output_file = ::File.expand_path(output_file)
589589
when '-O'
590-
if (order_by = args.shift.to_i - 1) == -1
590+
if (order_by = args.shift.to_i - 1) < 0
591591
print_error('Please specify a column number starting from 1')
592592
return
593593
end

0 commit comments

Comments
 (0)