From 138d042b2e52f896c5d79a18f20afc188fce937e Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Tue, 15 Jan 2019 01:22:44 +0100 Subject: [PATCH] Fix bug in type conciliation function Casting wasn't enough, it needed to call to_uint(). --- cpreproc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpreproc.py b/cpreproc.py index 4d0405e..d1ebcbf 100644 --- a/cpreproc.py +++ b/cpreproc.py @@ -244,7 +244,7 @@ class Evaluator(object): """Perform usual arithmetic conversions on two operands.""" assert type(op1) in (sint, uint) and type(op2) in (sint, uint) if type(op1) != type(op2): - return uint(op1), uint(op2) + return self.to_uint(op1), self.to_uint(op2) return op1, op2 def primary_expression(self, evaluating):