From 4c7abb9feb7a6ff0e1d874968cf957281632ed98 Mon Sep 17 00:00:00 2001 From: Philip Craig Date: Sat, 29 Jun 2024 12:25:08 +1000 Subject: [PATCH] Fix clippy warning --- src/read/coff/section.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/read/coff/section.rs b/src/read/coff/section.rs index 28b5e2e7..280b5c43 100644 --- a/src/read/coff/section.rs +++ b/src/read/coff/section.rs @@ -573,7 +573,7 @@ impl pe::ImageSectionHeader { ) -> read::Result<&'data [pe::ImageRelocation]> { let mut pointer = self.pointer_to_relocations.get(LE).into(); let mut number: usize = self.number_of_relocations.get(LE).into(); - if number == core::u16::MAX.into() + if number == u16::MAX.into() && self.characteristics.get(LE) & pe::IMAGE_SCN_LNK_NRELOC_OVFL != 0 { // Extended relocations. Read first relocation (which contains extended count) & adjust