Skip to content

Commit 8f33d01

Browse files
committed
feat: add initial support for size_t
From looking at an event log which utilises size_t it can be seen to output size_t in hex. This commit adds support for widths 4 & 8, by applying them to the HexInt32 and HexInt64 variants.
1 parent 727947a commit 8f33d01

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/binxml/value_variant.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,11 @@ impl<'a> BinXmlValue<'a> {
263263
(BinXmlValueType::Real64Type, _) => BinXmlValue::Real64Type(try_read!(cursor, f64)?),
264264
(BinXmlValueType::BoolType, _) => BinXmlValue::BoolType(try_read!(cursor, bool)?),
265265
(BinXmlValueType::GuidType, _) => BinXmlValue::GuidType(try_read!(cursor, guid)?),
266-
// TODO: find a sample with this token.
267-
(BinXmlValueType::SizeTType, _) => {
268-
return Err(DeserializationError::UnimplementedValueVariant {
269-
name: "SizeT".to_owned(),
270-
size,
271-
offset: cursor.position(),
272-
})
266+
(BinXmlValueType::SizeTType, Some(4)) => {
267+
BinXmlValue::HexInt32Type(try_read!(cursor, hex32)?)
268+
}
269+
(BinXmlValueType::SizeTType, Some(8)) => {
270+
BinXmlValue::HexInt64Type(try_read!(cursor, hex64)?)
273271
}
274272
(BinXmlValueType::FileTimeType, _) => {
275273
BinXmlValue::FileTimeType(try_read!(cursor, filetime)?)

0 commit comments

Comments
 (0)