From 9bfa5f154be974efa5c9773c87334cb06ebb9230 Mon Sep 17 00:00:00 2001 From: s1341 Date: Thu, 4 Jan 2024 09:02:29 +0200 Subject: [PATCH] size is a usize --- frida-gum/src/range_details.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frida-gum/src/range_details.rs b/frida-gum/src/range_details.rs index 7e5838c..5fdea78 100644 --- a/frida-gum/src/range_details.rs +++ b/frida-gum/src/range_details.rs @@ -43,7 +43,7 @@ pub enum PageProtection { #[derive(Clone)] pub struct FileMapping<'a> { path: &'a str, - size: u64, + size: usize, offset: u64, phantom: PhantomData<&'a gum_sys::GumFileMapping>, } @@ -56,7 +56,7 @@ impl<'a> FileMapping<'a> { Some(unsafe { Self { path: CStr::from_ptr((*file).path).to_str().unwrap(), - size: (*file).size, + size: (*file).size as usize, offset: (*file).offset, phantom: PhantomData, } @@ -75,8 +75,8 @@ impl<'a> FileMapping<'a> { } /// The size of the mapping. - pub fn size(&self) -> u64 { - self.size + pub fn size(&self) -> usize { + self.size as usize } }