Whole file

da4089/simplefix

The author described this change as Fix #58: Checksum is not always 3 ASCII characters. It counts as a record because the check below fails on the code as it stood at e46841b15 and passes on 0aef214f6, with nothing else changed between the two runs.

Fix saved2023-09-12
Sharing licenceMIT · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a save note

Fix #58: Checksum is not always 3 ASCII characters

The change

570570 checksum = 0
571571 for c in buf:
572572 checksum += c
573- buf += b"10=" + fix_val(f"{checksum % 256}") + SOH_STR
573+ buf += b"10=" + fix_val(f"{checksum % 256:03}") + SOH_STR
574574
575575 return buf
576576

The check that tells the two apart

failpass·test/test_message.py::MessageTests::test_cooked_checksum

Check file test/test_message.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before ite46841b1514accc6d772a385800d7a8dabd0b43b
Broken version dated2023-09-08
Modulesimplefix.message
Units changedFixMessage
Fingerprint6fbab365e1f57722
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in da4089/simplefix