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
44.97k stars 1.95k forks source link

[Bug] Integer to Buffer conversion not working #1915

Open GarThor opened 1 month ago

GarThor commented 1 month ago

Operating System

Windows

What's the issue you encountered?

Using the Data Processor feature, if I create an "Integer to Buffer" node, and then route that to either a "Buffer to Integer" (and then an "Integer Display" node), or directly to a "Bits Display" node, both display nodes only display "???", where I would expect a number.

image

How can the issue be reproduced?

See "Issue"

o Go to Data Processor o Add the following nodes

ImHex Version

1.32.X@811214d

ImHex Build Type

Installation type

MSI

Additional context?

No response

paxcut commented 1 month ago

why is the buffers size 32? thats 32 bytes. Buffer size 32 doesn't work because an integer can only be at most 16 bytes. If you try a number between 1 and 16 then it works

image

paxcut commented 1 month ago

If you try to run it using 32 in size you should get result like this:

image

GarThor commented 1 month ago

Odd, I didn't see the warning initially...

I assumed buffer size was in bits, which is why I specified 32 instead of 4. I thought I had tried smaller numbers, but it seems to be working as intended now.

paxcut commented 1 month ago

I had the same problem at first. I typed 4 in the size field and nothing changed. Then I remembered that I didn't have continuous evaluation on so I had to press play to execute the code. When I typed 32 in the size again and pressed play I saw the warning.

Using bits for the size wouldn't make sense. You could type things like 12 or 7 but that wouldn't give you those number of bits.