Skip to content

[Bug] Slice buffer node range excludes "To" index #1880

@alexenglish

Description

@alexenglish

Operating System

Windows

What's the issue you encountered?

The Slice buffer node outputs buffer addresses of [From:To-1] instead of [From:to]. Apart from not working as expected, this also makes it impossible to get the last byte from a buffer in a slice operation.

How can the issue be reproduced?

In the data processor create a Slice buffer node and pass a buffer through it. Observe that in the output the data starts at the From value index position, and ends one byte shy of the index for the To position. Also observe that it doesn't seem possible to get the last byte out of the slice regardless of values, since a "To" value greater than the length of a buffer errors out as out of range.

ImHex Version

1.35.4

ImHex Build Type

  • Nightly or built from sources

Installation type

Windows install via MSI

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