Convert bools to int before arithmetic

Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
Werner Lewis 2022-08-24 16:37:44 +01:00
parent 92c876aaa9
commit 6c70d745d1

View file

@ -131,7 +131,7 @@ class BignumCmp(BignumOperation):
def __init__(self, val_l, val_r): def __init__(self, val_l, val_r):
super().__init__(val_l, val_r) super().__init__(val_l, val_r)
self._result = (self.int_l > self.int_r) - (self.int_l < self.int_r) self._result = int(self.int_l > self.int_r) - int(self.int_l < self.int_r)
self.symbol = ["<", "==", ">"][self._result + 1] self.symbol = ["<", "==", ">"][self._result + 1]
def result(self): def result(self):