Skip to content

Commit

Permalink
Bugfix: incorrect data type in CANAPE_EXT for 4-byte enums
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielT committed Oct 17, 2024
1 parent f72ad5f commit 0928f12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/update/ifdata_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ fn update_ifdata_canape_ext(
}
DwarfDataType::Enum { size, .. } => {
match *size {
1 => link_map.datatype = 0x87,
2 => link_map.datatype = 0x8f,
4 => link_map.datatype = 0x8f,
8 => link_map.datatype = 0xbf,
1 => link_map.datatype = 0x87, // 0x40 | 0x07 -> unsigned, 8 bits
2 => link_map.datatype = 0x8f, // 0x40 | 0x0f -> unsigned, 16 bits
4 => link_map.datatype = 0x9f, // 0x40 | 0x1f -> unsigned, 32 bits
8 => link_map.datatype = 0xbf, // 0x40 | 0x3f -> unsigned, 64 bits
_ => link_map.datatype = 0,
}
link_map.bit_offset = 0;
Expand Down

0 comments on commit 0928f12

Please sign in to comment.