Skip to content

Commit 4d33742

Browse files
author
kernelsmith
committed
fixed bug with -A
1 parent 86e4bb2 commit 4d33742

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,7 +2462,7 @@ def cmd_grep(*args)
24622462
args.shift(2)
24632463
when "-B"
24642464
# also return arg lines before a match
2465-
output_mods[:before] = (val.to_i * -1)
2465+
output_mods[:before] = val.to_i
24662466
# delete opt and val from args list
24672467
args.shift(2)
24682468
when "-v"
@@ -3037,7 +3037,7 @@ def retrieve_grep_lines(all_lines,line_num, before = nil, after = nil)
30373037
before = before.to_i.abs
30383038
start = line_num - before
30393039
start = 0 if start < 0
3040-
finish = line_num + before
3040+
finish = line_num + after
30413041
return all_lines.slice(start..finish)
30423042
end
30433043
end

0 commit comments

Comments
 (0)