diff options
| author | Peter LaFosse <peter@vector35.com> | 2021-06-23 20:21:31 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2021-09-05 10:08:09 -0400 |
| commit | fca74fbb2d344ed36473d125abed7a561c08ea9a (patch) | |
| tree | a177ee58c2ef4fb433bbdc817f016d949faa76e2 /python/architecture.py | |
| parent | 7ce9675f04fd1a28627d99ce4e79d0a22ad8586a (diff) | |
Fix InstructionInfo
Diffstat (limited to 'python/architecture.py')
| -rw-r--r-- | python/architecture.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/architecture.py b/python/architecture.py index 650f93a1..a6bac57b 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -21,7 +21,7 @@ import traceback import ctypes from typing import Generator, Union, List, Optional, Mapping, Tuple, NewType -from dataclasses import dataclass +from dataclasses import dataclass, field # Binary Ninja components import binaryninja @@ -129,7 +129,7 @@ class InstructionInfo(object): length:int = 0 arch_transition_by_target_addr:bool = False branch_delay:bool = False - branches:List[InstructionBranch] = [] + branches:List[InstructionBranch] = field(default_factory=list) def add_branch(self, branch_type, target = 0, arch = None): self.branches.append(InstructionBranch(branch_type, target, arch)) |
