We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d44fd0 commit ba4c676Copy full SHA for ba4c676
1 file changed
can/io/blf.py
@@ -197,11 +197,9 @@ def __iter__(self):
197
obj_size = header[3]
198
obj_type = header[4]
199
# Calculate position of next object
200
- if obj_size % 4 and obj_type != CAN_FD_MESSAGE_64:
201
- next_pos = pos + obj_size + (obj_size % 4)
202
- else:
203
- # CAN_FD_MESSAGE_64 objects are not padded to 4 bytes.
204
- next_pos = pos + obj_size
+ next_pos = pos + obj_size
+ if obj_type != CAN_FD_MESSAGE_64:
+ next_pos += obj_size % 4
205
if next_pos > len(data):
206
# Object continues in next log container
207
break
0 commit comments