binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Append field does not add the new field at the end of the stucture when there are empty bytes in the structure defition

Open xusheng6 opened this issue 1 year ago • 0 comments

Repro steps:

  1. Define an empty structure, set its size to 0x10
  2. Append a field to it
  3. Observe the field is added at the start of the structure, rather than at the end of it

Screenshot 2024-09-26 at 12 50 39 PM

Note this works when all of the bytes are occupied by the structure fields. It seems like that we always append the field to the next not occupied byte. Is this intended? I think we should still add it to the end of the structure

xusheng6 avatar Sep 26 '24 16:09 xusheng6