afrantzis / bless

Bless - Gtk# Hex Editor
GNU General Public License v2.0
210 stars 38 forks source link

Add 64 bit signed and unsigned conversations #48

Closed huntergregal closed 2 years ago

huntergregal commented 2 years ago

Adds a new column to the conversation widget to support singed and unsigned 64 bit integers.

This resolves Issue #34

afrantzis commented 2 years ago

Hi! Thanks for the pull request! I have merged an adaptation of this at: https://github.com/afrantzis/bless/commit/103fbd6f4e449666e72fe21d3151a94adef5b880

The changes compared to this PR are:

  1. Rearranged the entries in the conversion table to maintain 3 columns. Although the proposed layout (separate 32bit and 64bit columns) makes sense, it forces the minimum window width to be too large.
  2. Fixed a small issue with the 64bit little endian calculation. In particular the loop for (int i = 4; i < 8; i++) ba[i] = dv.Buffer[offset+i]; is incomplete since it doesn't populate all bytes in the array. This loop works in the float64 part of UpdateFloat because the first 4 bytes have been already populated when dealing with float32 earlier in the function.