diff --git a/decompiler/frontend/binaryninja/handlers/unary.py b/decompiler/frontend/binaryninja/handlers/unary.py index 91e6c8de8..180aecfd0 100644 --- a/decompiler/frontend/binaryninja/handlers/unary.py +++ b/decompiler/frontend/binaryninja/handlers/unary.py @@ -98,8 +98,8 @@ def _lift_load_struct(self, instruction: mediumlevelil.MediumLevelILLoadStruct, """Lift a MLIL_LOAD_STRUCT_SSA (struct member access e.g. var#n->x) instruction.""" struct_variable = self._lifter.lift(instruction.src) struct_ptr: Pointer = self._lifter.lift(instruction.src.expr_type) - struct_member_name = struct_ptr.type.get_member_by_offset(instruction.offset).name - return MemberAccess(vartype=struct_ptr, operands=[struct_variable], offset=instruction.offset, member_name=struct_member_name) + struct_member = struct_ptr.type.get_member_by_offset(instruction.offset) + return MemberAccess(vartype=struct_ptr, operands=[struct_variable], offset=struct_member.offset, member_name=struct_member.name) def _lift_ftrunc(self, instruction: mediumlevelil.MediumLevelILFtrunc, **kwargs) -> UnaryOperation: """Lift a MLIL_FTRUNC operation."""