Skip to content

Commit

Permalink
trim trailing NUL character in build date (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckuethe authored Feb 6, 2024
1 parent 9a89ca3 commit b7c35d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion radiacode/radiacode.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def fw_version(self) -> tuple[tuple[int, int, str], tuple[int, int, str]]:
target_minor, target_major = r.unpack('<HH')
target_date = r.unpack_string()
assert r.size() == 0
return ((boot_major, boot_minor, boot_date), (target_major, target_minor, target_date))
return ((boot_major, boot_minor, boot_date), (target_major, target_minor, target_date.strip('\x00')))

def hw_serial_number(self) -> str:
r = self.execute(b'\x0b\x00')
Expand Down

0 comments on commit b7c35d3

Please sign in to comment.