summaryrefslogtreecommitdiff
path: root/rust/examples
diff options
context:
space:
mode:
Diffstat (limited to 'rust/examples')
-rw-r--r--rust/examples/dwarf/dwarf_export/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/examples/dwarf/dwarf_export/src/lib.rs b/rust/examples/dwarf/dwarf_export/src/lib.rs
index 18cc1e21..9ebf3bc7 100644
--- a/rust/examples/dwarf/dwarf_export/src/lib.rs
+++ b/rust/examples/dwarf/dwarf_export/src/lib.rs
@@ -287,7 +287,7 @@ fn export_type(
dwarf.unit.get_mut(array_dimension_die_uid).set(
gimli::DW_AT_upper_bound,
- AttributeValue::Data8((current_t.width() / element_type.width()) - 1),
+ AttributeValue::Data8(current_t.count() - 1),
);
if element_type.type_class() != TypeClass::ArrayTypeClass {