Skip to content

[Bug] Incorrect values in pattern data view for arrays of elements smaller than 1 byte. #2700

@paxcut

Description

@paxcut

Operating System

Windows

What's the issue you encountered?

When an array is made of elements smaller than 1 byte, the size of the array and the start and end of some values are incorrectly displayed in pattern data window.

How can the issue be reproduced?

The following simple pattern

#pragma example 0x14;

bitfield u4 {
    data : 4;
};

u4 test[2] @ 0;

Should create an array of size 1 byte and the two elements should occupy the lowers and the upper 4 bits respectively. Instead the patter data view shows the following:

Image

The size and the end of the array are incorrect and the position of one of the array elements is also wrong.

ImHex Version

1.39.0wip

ImHex Build Type

  • Nightly or built from sources

Installation type

built locally

Additional context?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions