diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-07-15 22:28:11 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-07-15 22:28:11 -0400 |
| commit | 9a97191ff5966c1621dc49091263d439a5b50fa8 (patch) | |
| tree | ccc8d5f8e779c0233d68ada87a31d885a872c96f /python | |
| parent | 2c2f521aa188d4f8027c5db8dfaf88f670d8a63f (diff) | |
Cap opcode display length to max instruction length in Python API
Diffstat (limited to 'python')
| -rw-r--r-- | python/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/__init__.py b/python/__init__.py index fb5bfa3c..390c4efd 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -3359,6 +3359,10 @@ class Architecture(object): self.__dict__["flags_written_by_flag_write_type"][write_type] = flag_names else: _init_plugins() + + if self.__class__.opcode_display_length > self.__class__.max_instr_length: + self.__class__.opcode_display_length = self.__class__.max_instr_length + self._cb = core.BNCustomArchitecture() self._cb.context = 0 self._cb.init = self._cb.init.__class__(self._init) |
