From d38f52e0bdedd67ad5882e04cf491dae8da4e6a6 Mon Sep 17 00:00:00 2001 From: Rot127 Date: Fri, 6 Sep 2024 09:08:27 -0500 Subject: [PATCH] Fix option setup of CS_OPT_DETAIL_REAL --- bindings/python/capstone/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/capstone/__init__.py b/bindings/python/capstone/__init__.py index 7be9447253..5be462da18 100755 --- a/bindings/python/capstone/__init__.py +++ b/bindings/python/capstone/__init__.py @@ -1082,8 +1082,8 @@ def option(self, opt_type, opt_value): status = _cs.cs_option(self.csh, opt_type, opt_value) if status != CS_ERR_OK: raise CsError(status) - if opt_type == CS_OPT_DETAIL: - self._detail = opt_value == CS_OPT_ON + if opt_type == CS_OPT_DETAIL or opt_type == CS_OPT_DETAIL_REAL: + self._detail = (opt_value & CS_OPT_ON) != 0 elif opt_type == CS_OPT_SKIPDATA: self._skipdata = opt_value == CS_OPT_ON elif opt_type == CS_OPT_UNSIGNED: