diff --git a/main.py b/main.py index d642df7..24ea1ef 100644 --- a/main.py +++ b/main.py @@ -301,7 +301,9 @@ class Bear(): for index in range(0, entry['number_of_elements']): kid = flat_entry.copy() kid['name'] = '{name}[{index}]'.format(name=flat_entry['name'], index=index) - kid['address'] = hex(int(flat_entry['address'], 16) + entry['size_byte'] * index) + + if ('address' in flat_entry) and ('size_byte' in entry): + kid['address'] = hex(int(flat_entry['address'], 16) + entry['size_byte'] * index) self.pettanko(kid)