diff options
| author | Ryan Snyder <ryan@vector35.com> | 2018-06-28 06:58:06 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-06-28 06:58:06 -0400 |
| commit | 8833eeb4c3b89f3ba6423b7f67a1a4277cabfc82 (patch) | |
| tree | 0d0054a6eab1f3658fb6805473a134104deccc5b | |
| parent | 08409f8e134b3d93fc56e5e29670f8a8f4def890 (diff) | |
Fix lifting of intrinsics in Python bindings
| -rw-r--r-- | binaryviewtype.cpp | 2 | ||||
| -rw-r--r-- | python/lowlevelil.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/binaryviewtype.cpp b/binaryviewtype.cpp index 233fdb87..762b2de7 100644 --- a/binaryviewtype.cpp +++ b/binaryviewtype.cpp @@ -29,7 +29,7 @@ BNBinaryView* BinaryViewType::CreateCallback(void* ctxt, BNBinaryView* data) BinaryViewType* type = (BinaryViewType*)ctxt; Ref<BinaryView> view = new BinaryView(BNNewViewReference(data)); Ref<BinaryView> result = type->Create(view); - if (result == nullptr) + if (!result) return nullptr; return BNNewViewReference(result->GetObject()); } diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 34048704..bd1e9349 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -1809,8 +1809,9 @@ class LowLevelILFunction(object): param_list = [] for param in params: param_list.append(param.index) - return self.expr(LowLevelILOperation.LLIL_INTRINSIC, len(outputs), self.add_operand_list(output_list), - self.arch.get_intrinsic_index(intrinsic), len(params), self.add_operand_list(param_list), flags = flags) + call_param = self.expr(LowLevelILOperation.LLIL_CALL_PARAM, len(params), self.add_operand_list(param_list).index) + return self.expr(LowLevelILOperation.LLIL_INTRINSIC, len(outputs), self.add_operand_list(output_list).index, + self.arch.get_intrinsic_index(intrinsic), call_param.index, flags = flags) def breakpoint(self): """ |
