diff options
| author | Truman Kilen <trumank@users.noreply.github.com> | 2025-12-15 18:08:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-15 19:08:27 -0500 |
| commit | a83f2082799695b85b732987adb21112d042b152 (patch) | |
| tree | 01eff7c715ca937d480671307c5a515e476e9322 /plugins | |
| parent | 81b2d4d06826abc2bbfb658831643c69e453c461 (diff) | |
Fix PDB bitfield members importing with wrong offset (#7797)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/pdb-ng/src/struct_grouper.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/pdb-ng/src/struct_grouper.rs b/plugins/pdb-ng/src/struct_grouper.rs index fcaf88ef..4dc50d3b 100644 --- a/plugins/pdb-ng/src/struct_grouper.rs +++ b/plugins/pdb-ng/src/struct_grouper.rs @@ -340,7 +340,7 @@ pub fn group_structure( .enumerate() .map(|(i, member)| MemberSize { index: i, - offset: member.bitfield_position.unwrap_or(member.offset * 8), + offset: member.offset * 8 + member.bitfield_position.unwrap_or(0), width: member .bitfield_size .unwrap_or(member.ty.contents.width() * 8), @@ -366,7 +366,7 @@ pub fn group_structure( structure.insert_bitwise( &member.ty, &member.name, - bit_pos, + member.offset * 8 + bit_pos, bit_width.map(|w| w as u8), false, member.access, @@ -409,7 +409,7 @@ fn apply_groups( structure.insert_bitwise( &member.ty, &member.name, - bit_pos, + (member.offset - offset) * 8 + bit_pos, bit_width.map(|w| w as u8), false, member.access, |
