From 93fba33e95006e18d1e16e3e32cbfde3a2457a38 Mon Sep 17 00:00:00 2001 From: Pavel Strnad Date: Wed, 25 Oct 2017 10:34:47 +0200 Subject: asn2wrs.py: use 64 bits variant for constrained integers using MIN or MAX keywords Change-Id: Iffc7c81e9653e8c1cd938de8f4fc26c5912eceec Reviewed-on: https://code.wireshark.org/review/24049 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin Reviewed-by: Michael Mann --- tools/asn2wrs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/asn2wrs.py') diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 76cd10c674..6788bf09cd 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -3618,8 +3618,9 @@ 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): + 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)) \ + or (maxv == 'MAX') or (minv == 'MIN'): return True return False -- cgit v1.2.3