Skip to content

fix: preserve hexadecimal EEPROM addresses - #60

Open
n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-config-hex-address
Open

n3orma wants to merge 1 commit into
bitcraze:mainfrom
n3orma:fix-config-hex-address

Conversation

@n3orma

@n3orma n3orma commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary

Fix hexadecimal address parsing in config set. Previously, an input such as address=0x10 was converted to the decimal string 16, then interpreted as hexadecimal 0x16.

  • Preserve hexadecimal digits and leading zeros in EEPROM addresses.
  • Support both 0x and 0X prefixes.
  • Keep existing numeric conversion for other configuration values and parameters.
  • Add four regression tests covering address formats, numeric parsing, and invalid input.

Fixes #46

Validation

  • git diff --check
  • cargo test --locked config_address_tests
  • cargo test --locked
  • cargo build --locked

Signed-off-by: Dharmesh Makvana <212810347+n3orma@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

config set address=0x... rejects or mangles the address

1 participant