Skip to content

Commit

Permalink
fix tilib struct alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran committed Jan 21, 2025
1 parent 4e1c9bf commit 95c7032
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tools/tilib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,11 @@ fn print_til_type_struct_layout(
.as_ref()
.map(IDBString::as_utf8_lossy)
.unwrap_or(Cow::Owned(String::new()));
// offset alignment
let align_diff = offset % member_align;
if align_diff != 0 {
offset += member_align - align_diff;
}
write!(fmt, "//{i:>3}. {offset:04X} {member_size:04X} effalign({member_align}) fda=0 bits=0000 {name}.")?;
if !member_name.as_bytes().is_empty() {
fmt.write_all(member_name.as_bytes())?;
Expand Down

0 comments on commit 95c7032

Please sign in to comment.