Convert bools to int before arithmetic
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
92c876aaa9
commit
6c70d745d1
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue