Fixes ASN.1 generation for VALS using 64 bits
VALS generation did not take into account the constraints on integers. We now generate VALS if no constraints are present and VALS64 if the interger needs 64 bits. Change-Id: Ia044ee1ba1bd5b45554c19a458876e20110b1b7f Reviewed-on: https://code.wireshark.org/review/31252 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
aaf709da67
commit
f4b0b21092
|
@ -1202,7 +1202,10 @@ class EthCtx:
|
|||
if (use_ext):
|
||||
self.eth_type[nm]['attr']['STRINGS'] = '&%s_ext' % (self.eth_vals_nm(nm))
|
||||
else:
|
||||
self.eth_type[nm]['attr']['STRINGS'] = 'VALS(%s)' % (self.eth_vals_nm(nm))
|
||||
if self.eth_type[nm]['val'].HasConstraint() and self.eth_type[nm]['val'].constr.Needs64b(self):
|
||||
self.eth_type[nm]['attr']['STRINGS'] = 'VALS64(%s)' % (self.eth_vals_nm(nm))
|
||||
else:
|
||||
self.eth_type[nm]['attr']['STRINGS'] = 'VALS(%s)' % (self.eth_vals_nm(nm))
|
||||
self.eth_type[nm]['attr'].update(self.conform.use_item('ETYPE_ATTR', nm))
|
||||
for t in self.eth_type_ord:
|
||||
bits = self.eth_type[t]['val'].eth_named_bits()
|
||||
|
|
Loading…
Reference in New Issue