python: fix NEO's get_arch_info()
diff --git a/bindings/python/capstone/__init__.py b/bindings/python/capstone/__init__.py
index d6b8fa5..0643d86 100644
--- a/bindings/python/capstone/__init__.py
+++ b/bindings/python/capstone/__init__.py
@@ -657,7 +657,7 @@
elif arch == CS_ARCH_EVM:
(self.pop, self.push, self.fee) = evm.get_arch_info(self._raw.detail.contents.arch.evm)
elif arch == CS_ARCH_NEO:
- (self.pop, self.push, self.fee) = neo.get_arch_info(self._raw.detail.contents.arch.neo)
+ (self.op_size, self.pop, self.push, self.fee) = neo.get_arch_info(self._raw.detail.contents.arch.neo)
def __getattr__(self, name):
diff --git a/bindings/python/capstone/neo.py b/bindings/python/capstone/neo.py
index 4aa54ea..b3d42e6 100644
--- a/bindings/python/capstone/neo.py
+++ b/bindings/python/capstone/neo.py
@@ -7,11 +7,22 @@
# define the API
class CsNeo(ctypes.Structure):
_fields_ = (
+ ('op_size', ctypes.c_byte),
('pop', ctypes.c_byte),
('push', ctypes.c_byte),
('fee', ctypes.c_uint),
)
def get_arch_info(a):
- return (a.pop, a.push, a.fee)
+ if a.fee == NEO_FEE_0:
+ return (a.op_size, a.pop, a.push, 0)
+ if a.fee == NEO_FEE_01:
+ return (a.op_size, a.pop, a.push, 0.1)
+ if a.fee == NEO_FEE_001:
+ return (a.op_size, a.pop, a.push, 0.01)
+ if a.fee == NEO_FEE_002:
+ return (a.op_size, a.pop, a.push, 0.02)
+ if a.fee == NEO_FEE_0001:
+ return (a.op_size, a.pop, a.push, 0.001)
+ return None