aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPavel Strnad <strnadp@tiscali.cz>2017-10-25 10:34:47 +0200
committerMichael Mann <mmann78@netscape.net>2017-10-25 21:10:11 +0000
commit93fba33e95006e18d1e16e3e32cbfde3a2457a38 (patch)
tree448a811425a94ce3385cfe47acbb6b46399ccfa5 /tools
parenteae216ef1db4b22e533231c8766cf4fad148eda6 (diff)
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 <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/asn2wrs.py5
1 files changed, 3 insertions, 2 deletions
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