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

[Bug] Goto parses input address as decimal instead of hex #1605

Open
1 task
ButThouMust opened this issue Mar 21, 2024 · 1 comment
Open
1 task

[Bug] Goto parses input address as decimal instead of hex #1605

ButThouMust opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ButThouMust
Copy link

Operating System

Windows

What's the issue you encountered?

Every feature in the File and Edit tabs that takes numerical input except Goto (Search, Select, Resize, Insert, etc.) parses its inputs as hex values by default. Goto, however, parses the target address as a decimal value, unless you deliberately prefix the input with 0x every time you want to jump to a hex address.

How can the issue be reproduced?

  • Create or load a file that is at least one hundred bytes large.
  • Execute the Goto command with the input 64.
    • Observe that the file position is now 0x40 instead of 0x64.
  • Do the Goto command again but with the input 0x64.
    • Observe that the file position is now 0x64.

ImHex Version

1.33.1

ImHex Build Type

  • Nightly or built from sources

Installation type

Portable

Additional context?

No response

@ButThouMust ButThouMust added the bug Something isn't working label Mar 21, 2024
@WerWolv
Copy link
Owner

WerWolv commented Mar 21, 2024

Hey, I can see how this is kinda confusing but this is on purpose.
If you check the interface it has this icon next to the text input which means this is a math field.
image

The idea is that you can enter mathematical expressions when wanting to jump to certain addresses, for example I often do 0xSomeSize + 0xSizeOfStructThere * SomeIndex. That wouldn't be possible if it was a regular hex input field.
What could maybe be done is just pre-filling the field with 0x by default or something like that

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