From 26268e69af4609d87b7c5f6b8f4d3a2f0be1f0c9 Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Tue, 8 Oct 2024 06:48:05 +0200 Subject: [PATCH] python: Fix assertion failure on ctl_flush_tb() (#2023) --- bindings/python/unicorn/unicorn_py3/unicorn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/unicorn/unicorn_py3/unicorn.py b/bindings/python/unicorn/unicorn_py3/unicorn.py index 526f06b0..f5765429 100644 --- a/bindings/python/unicorn/unicorn_py3/unicorn.py +++ b/bindings/python/unicorn/unicorn_py3/unicorn.py @@ -1172,7 +1172,7 @@ class Uc(RegStateManager): @staticmethod def __ctl_encode(ctl: int, op: int, nargs: int) -> int: - assert nargs and check_maxbits(nargs, 4), f'nargs must not exceed value of 15 (got {nargs})' + assert check_maxbits(nargs, 4), f'nargs must not exceed value of 15 (got {nargs})' assert op and check_maxbits(op, 2), f'op must not exceed value of 3 (got {op})' return (op << 30) | (nargs << 26) | ctl