WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
39.53k stars 1.74k forks source link

[Bug] When working on more than one file, the patter editor ignores new settings #1682

Closed Kaba8081 closed 1 month ago

Kaba8081 commented 1 month ago

Operating System

Windows

What's the issue you encountered?

When importing files into a project, pattern editor ignores specified settings and uses default values. By opening the file in a new window, everything is working fine, but rewriting the pattern, importing diffrent files, from diffrent locations did not fix the issue.

How can the issue be reproduced?

Import a second file into a project by drag and dropping or File -> Open File.

ImHex Version

1.33.2

ImHex Build Type

Installation type

MSI installer

Additional context?

First file opened in the project and it's values. OriginalFile

Every other has it's settings set to default (endian little, bitfield_order right_to_left, etc.) even though they should be changed. SecondFile

paxcut commented 1 month ago

The values on pragmas are not options that the pattern editor reads to use as values for newly opened or created patterns. pragmas are like any other preprocessor directives. A pattern file is just a text file that the pattern editor reads, displays and allows you to edit. Pattern editor does not perform any of the duties associated with parsing or evaluating patterns , it is just a text editor. As it stands there is no way to specify a pragma value in one pattern that applies to all the patterns that are opened afterwards, unless you sync the patterns which means that all patterns are the same.

I think you are running into a bug that pragmas are not updated once set that was fixed a while back. download the latest nightly should fix the issue.

Kaba8081 commented 1 month ago

You are right. Updating to the latest nightly version fixed the issue.