Using double underscore in the find() will also include edge cases like when the calling class contains an underscore i.e. THE_CLASS

This commit is contained in:
Gustavo Moreira
2021-07-14 20:45:43 +10:00
parent e441742a83
commit a795a7e2d5
+1 -1
View File
@@ -738,7 +738,7 @@ class AggregateType(interfaces.objects.ObjectInterface):
if attr in self._concrete_members:
return self._concrete_members[attr]
if attr.startswith("_") and not attr.startswith("__") and "__" in attr:
attr = attr[attr.find("_", 1):] # See issue #522
attr = attr[attr.find("__", 1):] # See issue #522
if attr in self.vol.members:
mask = self._context.layers[self.vol.layer_name].address_mask
relative_offset, template = self.vol.members[attr]