Skip to content

fix(hlpr): parse hex files without an extended address record - #22

Merged
MrKevinWeiss merged 1 commit into
masterfrom
fix/hexfile-no-extended-address
Sep 30, 2026
Merged

MrKevinWeiss merged 1 commit into
masterfrom
fix/hexfile-no-extended-address

Conversation

@MrKevinWeiss

Copy link
Copy Markdown
Collaborator

extract_identifier_from_hexfile only assigned extended_address on a type 04 record. A valid Intel HEX file whose data records come before any 04 record (small images, tools that omit the default :020000040000FA) crashed with UnboundLocalError, which also escaped fw_id_from_fw_file's ValueError contract. The upper address bits now start at 0, as Intel HEX defines.

New test strips the 04 record from an existing fixture; it fails on master with the UnboundLocalError.

🤖 Generated with Claude Code

extract_identifier_from_hexfile only set extended_address on a type 04
record, so a valid Intel HEX file whose data records come first raised
UnboundLocalError, which also escaped fw_id_from_fw_file's ValueError
contract. Start at 0, as Intel HEX defines.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@MrKevinWeiss
MrKevinWeiss merged commit e6d4670 into master Sep 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant