summaryrefslogtreecommitdiff
path: root/plugins/warp/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/warp/src/bin')
-rw-r--r--plugins/warp/src/bin/sigem.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/warp/src/bin/sigem.rs b/plugins/warp/src/bin/sigem.rs
index 2da14639..d7f1f50b 100644
--- a/plugins/warp/src/bin/sigem.rs
+++ b/plugins/warp/src/bin/sigem.rs
@@ -103,10 +103,17 @@ fn data_from_view(view: &BinaryView) -> Data {
Some(warp_ninja::cache::cached_function(&f, &llil))
})
.collect::<Vec<_>>();
- data.types.extend(view.types().iter().map(|ty| {
- let ref_ty = ty.type_object().to_owned();
- ComputedType::new(from_bn_type(view, &ref_ty, u8::MAX))
- }));
+
+ if let Some(ref_ty_cache) = cached_type_references(view) {
+ let referenced_types = ref_ty_cache
+ .cache
+ .iter()
+ .filter_map(|t| t.to_owned())
+ .collect::<Vec<_>>();
+
+ data.types.extend(referenced_types);
+ }
+
data
}