Skip to content

Commit

Permalink
Fix creating invalid BBF
Browse files Browse the repository at this point in the history
  • Loading branch information
danopernis committed Sep 6, 2024
1 parent 23f7b07 commit 61aa78f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/pack_fw.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def write_version(ver, *, build_number: int):
data += getattr(ver, it).to_bytes(1, 'little')
data += build_number.to_bytes(2, 'little')
data += ver.prerelease.ljust(5, '\0').encode()
if len(data) != 10:
raise ValueError('version must be 10 bytes long')
return data


Expand Down

0 comments on commit 61aa78f

Please sign in to comment.