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] Endian pragma ignored #1588

Closed
1 task done
x4fx77x4f opened this issue Mar 9, 2024 · 3 comments
Closed
1 task done

[Bug] Endian pragma ignored #1588

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

Comments

@x4fx77x4f
Copy link

Operating System

Linux

What's the issue you encountered?

The endian pragma is ignored. While writing a pattern for a big endian format, I was experiencing unintended behavior.

How can the issue be reproduced?

With this file

00000000: a1b2                                     ..

and this pattern

#pragma endian big
u16 value_default @ 0;
be u16 value_be @ 0;
le u16 value_le @ 0;

, the values in the pattern data are 0xb2a1, 0xa1b2, and 0xb2a1 instead of 0xa1b2, 0xa1b2, 0xb2a1 as expected.

ImHex Version

1.33.0 (master@f050c69)

ImHex Build Type

  • Nightly or built from sources

Installation type

Compiled from source

Additional context?

My machine is little endian. std::core::set_endian works as expected.

@x4fx77x4f x4fx77x4f added the bug Something isn't working label Mar 9, 2024
@tim-tim707
Copy link

Don't have this problem on windows with version 1.31 and 1.33 but a friend of mine had this issue on windows 1.33 first install and rollback to version 1.31 which works for him

@elafargue
Copy link

Same issue here an an Intel Mac, v1.33.1

@WerWolv
Copy link
Owner

WerWolv commented Mar 15, 2024

Latest commit fixes this issue

@WerWolv WerWolv closed this as completed Mar 15, 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

4 participants