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] Passing a (placed) struct as non-type template parameter makes it disappear #1642

Open
1 task done
Calcoph opened this issue Apr 28, 2024 · 2 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@Calcoph
Copy link

Calcoph commented Apr 28, 2024

Operating System

Windows

What's the issue you encountered?

When passing structs that have been placed as non-type template parameter, they no longer render in the hex-edoitor or pattern data. This doesn't happen with built in types (like u32), but it does with structs.

How can the issue be reproduced?

struct A {
    u8 field1;
};

struct B<auto S> {
    u8 arr[S.field1];
};

A a @ 0x00;
B<a> b @ 0x01;

a doesn't get rendered.

struct B<auto S> {
    u8 arr[S.field1];
};

u32 a @ 0x00;
B<a> b @ 0x01;

a gets rendered.

ImHex Version

1.33.0 a7033b6

ImHex Build Type

  • Nightly or built from sources

Installation type

MSI

Additional context?

No response

@Calcoph Calcoph added the bug Something isn't working label Apr 28, 2024
@paxcut
Copy link
Contributor

paxcut commented Apr 28, 2024

This looks a lot like #1628. Maybe they are related.

@Calcoph
Copy link
Author

Calcoph commented Apr 28, 2024

This looks a lot like #1628. Maybe they are related.

Seems to be the case.

If I do instead:

struct A {
    u8 field1;
};

struct B<auto S> {
    u8 arr[S];
};

A a @ 0x00;
B<a.field1> b @ 0x01;

neither a, nor a.field1 disappears.

By doing:

struct C {
    u8 field2;
};

struct A {
    u8 field1;
    C fieldC;
};

struct B<auto S> {
    u8 arr[S.field2];
};

A a @ 0x00;
B<a.fieldC> b @ 0x02;

a.fieldC disappears but a.field1 doesn't, like in that issue.

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