ImHex
ImHex copied to clipboard
[Bug] Can't evaluate sizeof() of a fixed size structure with pointers.
Operating System
Windows
What's the issue you encountered?
Almost the same as #2386 but with the [[fixed_size(size)]] Attribute.
How can the issue be reproduced?
struct Test {
u32 *ptr:u32;
}[[fixed_size(4)]];
std::print("size = {}", sizeof(Test));
ImHex Version
1.37.4
ImHex Build Type
- [ ] Nightly or built from sources
Installation type
MSI
Additional context?
Just wanted to add an alternate answer to #2386 but found another bug.
And by the way, if I set [[fixed_size(4)]] twice with two different sizes it doesn't complain even if it doesn't makes any sens:
struct Test {
u32 *ptr:u32;
}[[fixed_size(4), fixed_size(96)]]; //This line should rise an error