diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-09-26 17:23:05 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-09-26 17:23:25 -0400 |
| commit | 78a13604bfeba1798379d15d6e26f4b6c128bda1 (patch) | |
| tree | 43dfe47334c0c065a2da07572190f58082863050 /python/__init__.py | |
| parent | 9a60e9fe7bd3fc09baa59957e8ea7587d0281b20 (diff) | |
Fix NES plugin after API changes
Diffstat (limited to 'python/__init__.py')
| -rw-r--r-- | python/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/__init__.py b/python/__init__.py index 80302c0c..26c8fb5d 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -1022,7 +1022,7 @@ class BinaryView(object): self.file = file_metadata self.handle = core.BNCreateCustomBinaryView(self.__class__.name, file_metadata.handle, self._cb) self.notifications = {} - self.next_address = self.entry_point + self.next_address = None # Do NOT try to access view before init() is called, use placeholder @classmethod def register(cls): @@ -1579,6 +1579,8 @@ class BinaryView(object): """ if arch is None: arch = self.arch + if self.next_address is None: + self.next_address = self.entry_point txt, size = arch.get_instruction_text(self.read(self.next_address, self.arch.max_instr_length), self.next_address) self.next_address += size if txt is None: |
