Fix on 'end_bit' computation

This commit is contained in:
xabiugarte
2019-11-11 17:03:04 +00:00
committed by ikelos
parent 989f08eff2
commit 5b04492463
+1 -1
View File
@@ -369,7 +369,7 @@ class Version1Format(ISFormatTable):
elif type_name == 'enum':
update = self._lookup_enum(dictionary['name'])
elif type_name == 'bitfield':
update = {'start_bit': dictionary['bit_position'], 'end_bit': dictionary['bit_length']}
update = {'start_bit': dictionary['bit_position'], 'end_bit': dictionary['bit_position'] + dictionary['bit_length']}
update['base_type'] = self._interdict_to_template(dictionary['type'])
# We do *not* call native_template.clone(), since it slows everything down a lot
# We require that the native.get_type method always returns a newly constructed python object