diff --git a/decompiler/pipeline/controlflowanalysis/expression_simplification/constant_folding.py b/decompiler/pipeline/controlflowanalysis/expression_simplification/constant_folding.py index 2706987b0..13f345cb7 100644 --- a/decompiler/pipeline/controlflowanalysis/expression_simplification/constant_folding.py +++ b/decompiler/pipeline/controlflowanalysis/expression_simplification/constant_folding.py @@ -133,8 +133,9 @@ def _constant_fold_shift(constants: list[Constant], fun: Callable[[int, int], in raise IncompatibleOperandCount("Expected exactly 2 constants to fold") left, right = constants + norm_signed = signed and isinstance(left.type, Integer) and left.type.signed - return fun(normalize_int(left.value, left.type.size, left.type.signed and signed), right.value) + return fun(normalize_int(left.value, left.type.size, norm_signed), right.value) _OPERATION_TO_FOLD_FUNCTION: dict[OperationType, Callable[[list[Constant]], int]] = {