From cef82f69aa860a4d4927d21bb93df6dc81b55b97 Mon Sep 17 00:00:00 2001 From: kkent030315 Date: Thu, 31 Oct 2024 21:54:59 +0900 Subject: [PATCH] Simplify expression --- src/pe/resource.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pe/resource.rs b/src/pe/resource.rs index e856cf88..ece3cba1 100644 --- a/src/pe/resource.rs +++ b/src/pe/resource.rs @@ -465,7 +465,7 @@ impl<'a> ResourceData<'a> { /// the resource entries contained within this resource data. pub fn entries(&self) -> ResourceEntryIterator<'a> { let offset = core::mem::size_of::(); - let size = self.count() as usize * RESOURCE_ENTRY_SIZE; + let size = self.image_resource_directory.entries_size(); // Safety: Panic-free is guaranteed here by Self::parse_with_opts ResourceEntryIterator { num_resources: self.count() as usize,