Check if 'address' field exists before using it
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
69a48abce4
commit
97f7e89e93
2
main.py
2
main.py
|
@ -301,6 +301,8 @@ 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)
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user