summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-03-23 14:23:09 -0400
committerRyan Snyder <ryan@vector35.com>2018-03-23 14:24:03 -0400
commit5e56265478e39ec4a1e7bad40c4f8728c5a46214 (patch)
tree0ae24657a9ade84cb01c8469779e552f1ea7cd3d /python/function.py
parent7df91eab880eea11369072ae4ebc9b6ae2bb2f51 (diff)
Make indirect branch queries initialize CoreArchitecture objects correctly
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py
index 8c4b7765..1cc4dcac 100644
--- a/python/function.py
+++ b/python/function.py
@@ -558,7 +558,7 @@ class Function(object):
branches = core.BNGetIndirectBranches(self.handle, count)
result = []
for i in xrange(0, count.value):
- result.append(IndirectBranchInfo(architecture.CoreArchitecture._from_cache(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
+ result.append(IndirectBranchInfo(architecture.CoreArchitecture._from_cache(branches[i].sourceArch), branches[i].sourceAddr, architecture.CoreArchitecture._from_cache(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
core.BNFreeIndirectBranchList(branches)
return result
@@ -1142,7 +1142,7 @@ class Function(object):
branches = core.BNGetIndirectBranchesAt(self.handle, arch.handle, addr, count)
result = []
for i in xrange(0, count.value):
- result.append(IndirectBranchInfo(architecture.CoreArchitecture._from_cache(branches[i].sourceArch), branches[i].sourceAddr, architecture.Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
+ result.append(IndirectBranchInfo(architecture.CoreArchitecture._from_cache(branches[i].sourceArch), branches[i].sourceAddr, architecture.CoreArchitecture._from_cache(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined))
core.BNFreeIndirectBranchList(branches)
return result