ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Bug] Highlighting Issue using static struct in array

Open PizzaKirby opened this issue 9 months ago • 0 comments

Operating System

Windows

What's the issue you encountered?

While working on a pattern I've come across an issue, where if I apply a static struct pattern using an array highlighting & hover tooltip seem to be off.

How can the issue be reproduced?

Using a pattern like this

struct Skill {
    s16 id;
    char name[4];
} [[static, name("Skill")]];

Skill skill0[2] @ $;
Skill skill_ @ $ [[hidden]]; // spacing
Skill skill1 @ $;

I get the correct results in the Pattern Data view, but hovering over the name part of skill0, it is not highlighting the whole structure, but all of name the two following bytes (hopefully visible in the image) Image When I hover over the same part of skill1 it highlights correctly, all of name and the 2 previous bytes. Image

The hover tooltip for id seems to always be shown correctly, but the one for name is not. Using the array: Image and standalone: Image

All of this only happens if Skill is marked static. I've run into issues with static recently, so correct me if I'm wrong, but Skill is as static as it gets in my book.

Here is a small piece of data for easier visibility and the minimal example of a broken pattern. https://drive.proton.me/urls/PF8HYNZWAR#rmHvDI8Eh7mD (hosted on proton drive, I don't think you can upload files in an issue directly)

ImHex Version

1.37.4

ImHex Build Type

  • [ ] Nightly or built from sources

Installation type

Scoop (github release)

Additional context?

No response

PizzaKirby avatar Mar 21 '25 12:03 PizzaKirby