Hi list,
can we improve auto detection for 64b variant of constrained integers?
In the master branch we handle the cases of integers over/under +/- 2^32 but
what about MIX.. and ..MAX constants?
There are such dissectors in our current source tree: h245, t125, x509,..
that should use 64b instead of current 32b.
Can we use patch like bellow to improve it?
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
Best Regards,
Pavel