asn2wrs.py: fix Needs64b

This commit is contained in:
Huang Hao 2022-07-07 02:55:27 +00:00 committed by Pascal Quantin
parent 759e571c05
commit 58390334eb
1 changed files with 2 additions and 1 deletions

View File

@ -3676,7 +3676,8 @@ class Constraint (Node):
def Needs64b(self, ectx):
(minv, maxv, ext) = self.GetValue(ectx)
if ((str(minv).isdigit() or ((str(minv)[0] == "-") and str(minv)[1:].isdigit())) \
and str(maxv).isdigit() and (abs(int(maxv) - int(minv)) >= 2**32)) \
and (str(maxv).isdigit() or ((str(maxv)[0] == "-") and str(maxv)[1:].isdigit())) \
and ((abs(int(maxv) - int(minv)) >= 2**32) or (int(minv) < -2**31) or (int(maxv) >= 2**32))) \
or (maxv == 'MAX') or (minv == 'MIN'):
return True
return False