Skip to content

Commit

Permalink
dasm: minor fix in flatten_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
jjyg committed Oct 10, 2022
1 parent 89fb16e commit e2215f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion metasm/disassemble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class Disassembler
attr_accessor :funcs_stdabi
# callback called whenever an instruction will backtrace :x (before the backtrace is started)
# arguments: |addr of origin, array of exprs to backtrace|
# must return the replacement array, nil == []
# returns the replacement array, nil == unmodified arg2
attr_accessor :callback_newaddr
# called whenever an instruction is decoded and added to an instruction block. arg: the new decoded instruction
# returns the new di to consider (nil to end block)
Expand Down
2 changes: 1 addition & 1 deletion metasm/disassemble_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def flatten_graph(entry, include_subfunc=true)
if tmp and tmp.length == 1
to = tmp[0]
else
to = b.list.last.next_addr
to = b.list.last.next_addr rescue nil
end
if (todo.include?(to) or done.include?(to)) and di_at(to)
if done.include?(to)
Expand Down

0 comments on commit e2215f6

Please sign in to comment.