Skip to content

fix bitwise Hex() adapter#1021

Open
ahaensler wants to merge 1 commit intoconstruct:masterfrom
ahaensler:hex-adapter-bitwise-fix
Open

fix bitwise Hex() adapter#1021
ahaensler wants to merge 1 commit intoconstruct:masterfrom
ahaensler:hex-adapter-bitwise-fix

Conversation

@ahaensler
Copy link

d = BitStruct(
    "number" / Hex(BitsInteger(12))
)

This generates number = 0x000000000000000000000701. There's 24 digits because the adapter uses bit length instead of byte length.

My PR patches the adapter. number = 0x701.

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