Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little endian floats #30

Open
amurzeau opened this issue Mar 3, 2024 · 3 comments
Open

Little endian floats #30

amurzeau opened this issue Mar 3, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@amurzeau
Copy link

amurzeau commented Mar 3, 2024

Hi,

It seems that HexWalk decode floats as big endian.
Here is Okteta decoding the float as 3.42:
image

And here HexWalk decode it as the number I would get as big endian in Okteta:
image

Okteta match what I expect while decoding raw little endian values (I encounter little endian more often than big endian).

I guess a solution is to add LE and BE for floats the same way there are LE/BE for Int.

Also, as an additional note, I found that when having a file with only 4 bytes, selecting the 4 bytes won't show me the float value, the 4th byte is not taken into account:
image
I can create a different issue for this if you prefer separating them.

@amurzeau
Copy link
Author

amurzeau commented Mar 3, 2024

Also, a 3rd note :)
Can floats be added to the "Number Converter" dialog (maybe with big/little endian too) ? Maybe it's not its purpose and I would be ok with that.

I encountered a case where I wanted to find the Hex bytes for a given float value.
So I used this instead: https://gregstoll.com/~gregstoll/floattohex/

@gcarmix
Copy link
Owner

gcarmix commented Mar 4, 2024

@amurzeau, thank you, I added a separate issue for this: #31 as it is a feature request

@gcarmix
Copy link
Owner

gcarmix commented Mar 4, 2024

@amurzeau Yes maybe the best would be to have both LE and BE for floats, I'll work on this and also on the bug, thank you

@gcarmix gcarmix added the bug Something isn't working label Mar 4, 2024
@gcarmix gcarmix self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants