summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-03-23 14:23:09 -0400
committerPeter LaFosse <peter@vector35.com>2018-03-23 17:10:07 -0400
commit69743572b93f2e29583751d1ec9656fbb34b9411 (patch)
tree0ae24657a9ade84cb01c8469779e552f1ea7cd3d /python
parent0f10f4b5cdccba661bd2d9354ee089f91d6a8d55 (diff)
Make indirect branch queries initialize CoreArchitecture objects correctly
Diffstat (limited to 'python')
-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