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

Can't define sequential buffers (opaque data) #313

Open
thedeadliestcatch opened this issue Oct 13, 2024 · 1 comment
Open

Can't define sequential buffers (opaque data) #313

thedeadliestcatch opened this issue Oct 13, 2024 · 1 comment

Comments

@thedeadliestcatch
Copy link

thedeadliestcatch commented Oct 13, 2024

Suppose this pattern:

my_struct def_block @0;

u32 base_offset = def_block.header.offset2 + (def_block.header.somethingsize * def_block.header.refstructs_count);

for (auto i = 0, i < def_block.header.refstructs_count, i = i + 1) {
    u32 payload_offset = base_offset + def_block.somethingsize[i].offset;
    u32 payload_size = def_block.somethingsize[i].size;
    u8 payload[payload_size] @ payload_offset;
};

Triggers the error:

E: [ Stack Trace ]
E: <Source Code>:103:32
E: 103 |  payload[payload_size] @ payload_offset;
E:                                 ^^^^^^^^^^^^^^
E: <Source Code>:104:1
E: 104 | };
E:       ^


E: runtime error: Pattern count exceeded set limit of '131072'.


E: If this is intended, try increasing the limit using '#pragma pattern_limit <new_limit>'.
@applecuckoo
Copy link
Contributor

@thedeadliestcatch your code isn't broken, ImHex just hit the pattern limit. This isn't that big of a problem, since you can just override it by setting the pattern_limit pragma to a bigger number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants