mirror of https://github.com/a2x/cs2-dumper.git
Fix compilation errors on windows
This commit is contained in:
parent
96da055d1a
commit
c19eaf1756
|
@ -1,5 +1,7 @@
|
|||
pub use module::Module;
|
||||
#[cfg(target_os = "linux")]
|
||||
pub use module::ModuleEntry;
|
||||
|
||||
pub use module::Module;
|
||||
pub use process::Process;
|
||||
|
||||
pub mod module;
|
||||
|
|
|
@ -94,7 +94,7 @@ impl<'a> Module<'a> {
|
|||
#[inline]
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn imports(&self) -> &[Import] {
|
||||
self.pe.imports
|
||||
&self.pe.imports
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -158,7 +158,7 @@ impl<'a> Module<'a> {
|
|||
#[inline]
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn sections(&self) -> &[SectionTable] {
|
||||
self.pe.sections
|
||||
&self.pe.sections
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use super::{Module, ModuleEntry};
|
||||
use super::Module;
|
||||
#[cfg(target_os = "linux")]
|
||||
use super::ModuleEntry;
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
|
||||
|
@ -66,7 +68,7 @@ impl Process {
|
|||
Ok(process)
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn find_pattern(&self, module_name: &str, pattern: &str) -> Option<Address> {
|
||||
pub fn find_pattern(&self, module_name: &str, pattern: &str) -> Option<usize> {
|
||||
let module = self.get_module_by_name(module_name)?;
|
||||
|
||||
let pattern_bytes = Self::pattern_to_bytes(pattern);
|
||||
|
|
Loading…
Reference in New Issue