Skip to content

Commit

Permalink
shallow copy structs and arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
blattm committed Aug 20, 2024
1 parent 7f220f8 commit 346df6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions decompiler/structures/pseudo/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def __str__(self) -> str:

def copy(self) -> ConstantComposition:
"""Generate a copy of the UnknownExpression with the same message."""
return ConstantComposition([x.copy() for x in self.value], self._type.copy())
return ConstantComposition(self.value, self._type)

def accept(self, visitor: DataflowObjectVisitorInterface[T]) -> T:
"""Invoke the appropriate visitor for this Expression."""
Expand Down Expand Up @@ -617,4 +617,4 @@ def __iter__(self) -> Iterator[Expression]:

def copy(self) -> StructConstant:
"""Generate a copy of the UnknownExpression with the same message."""
return StructConstant(self.value.copy(), self._type.copy()) # Deep copy needed for all Expr inside.
return StructConstant(self.value, self._type)

0 comments on commit 346df6f

Please sign in to comment.