Merge pull request #644 from paulkermann/bugfix/object_info

Object information ChainMap invalid order
This commit is contained in:
ikelos
2022-02-20 23:22:56 +00:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ class ObjectInterface(metaclass = abc.ABCMeta):
mask = context.layers[object_info.layer_name].address_mask
normalized_offset = object_info.offset & mask
self._vol = collections.ChainMap({}, object_info, {'type_name': type_name, 'offset': normalized_offset}, kwargs)
self._vol = collections.ChainMap({}, {'type_name': type_name, 'offset': normalized_offset}, object_info, kwargs)
self._context = context
def __getattr__(self, attr: str) -> Any:
+1 -1
View File
@@ -136,7 +136,7 @@ class PrimitiveObject(interfaces.objects.ObjectInterface):
if k not in ["context", "data_format", "object_info", "type_name"]:
kwargs[k] = v
kwargs['new_value'] = self.__new_value
return (self._context, self._vol.maps[-2]['type_name'], self._vol.maps[-3], self._data_format), kwargs
return (self._context, self._vol.maps[-3]['type_name'], self._vol.maps[-2], self._data_format), kwargs
@classmethod
def _unmarshall(cls, context: interfaces.context.ContextInterface, data_format: DataFormatInfo,