Just migrated a project from JNA 3.2.7 to 3.5.2
One of the structures contains a union and other fields after that union.
With the new version the fields after the union are mapped to wrong addresses - as if all fields of the union were present. The memory dump by toString shows "deafbeef".
In other words:
The Union's function size() reports the correct value (8), but the next field of the structure is placed 0x20 bytes after the start of the union (0x20 is the sum of all fields inside the union)
Just migrated a project from JNA 3.2.7 to 3.5.2
One of the structures contains a union and other fields after that union.
With the new version the fields after the union are mapped to wrong addresses - as if all fields of the union were present. The memory dump by toString shows "deafbeef".
In other words:
The Union's function size() reports the correct value (8), but the next field of the structure is placed 0x20 bytes after the start of the union (0x20 is the sum of all fields inside the union)