Fixed: Can't search for 64-bit integer

Bug reports concerning HxD.
Post Reply
Seeker14491
Posts: 1
Joined: 10 May 2020 09:56

Fixed: Can't search for 64-bit integer

Post by Seeker14491 »

In the Integer number tab within the find dialog, if you select 64 for the bitwidth, then any positive number you search for returns the error "<number> is out of range representable with 64 bits."

Additionally, if you choose "(any)" for the bitwidth, it doesn't accept any numbers between 2^63 and 2^64, giving the message "<number> is not a valid integer value".

edit: I'm on version 2.4.0.0.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Can't search for 64-bit integer

Post by Maël »

Thanks for the bug report.

The first is a bug, the second is expected since it searches for signed integers.

It should be extendable to search for both, signed integers and unsigned integers, without having to specify the signedness, due to how two's complement encoding works. However with the caveat of not being able to tell when the positive range of a signed integer is exceeded.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Can't search for 64-bit integer

Post by Maël »

Fixed in the development version.

The search uses the same code as the datainspector now to convert from text to an integer. It supports also (U)Int24 integer types, includes (U)Int24 types in its search, if you choose "any" bitwidth, and searches for both signed or unsigned numbers.

The latter is possible due to two's complement encoding of integer datatypes: Choosing the right type depending on which fits best (negative numbers => signed type, positive numbers => unsigned type; this is ok, because the positive numbers in the signed type have the same encoding as in the unsigned type).

I decided it was not necessary to distinguish between IntX and UIntX types for range checking, assuming the right type of the two possible ones (signed or unsigned) based on the given search pattern (i.e., number as text).

It will be available in the next release.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: Can't search for 64-bit integer

Post by Maël »

Fixed in 2.5, which will be released soon when all the translations are ready.

For now you can get it here (without setup):

German:
https://mh-nexus.de/downloads/HxD25Deu.zip
English:
https://mh-nexus.de/downloads/HxD25Enu.zip
Post Reply