mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-26 06:07:45 +00:00
Fix compilation for execlookup
This commit is contained in:
parent
b4fe74cf7d
commit
60d6382fbf
1 changed files with 2 additions and 4 deletions
|
@ -17,14 +17,12 @@ fn find_needle(installer_file: &Vec<u8>, needle: &str) -> Option<String> {
|
|||
let mut needle: Vec<u16> = needle.encode_utf16().collect();
|
||||
let bytes = from_u16(&mut needle);
|
||||
|
||||
let Some(position) = installer_file
|
||||
let Some(mut position) = installer_file
|
||||
.windows(bytes.len())
|
||||
.position(|window| window == bytes) else {
|
||||
return None;
|
||||
};
|
||||
|
||||
let mut position = position.unwrap();
|
||||
|
||||
|
||||
let parse_char_at_position = |position: usize| {
|
||||
let upper = installer_file[position];
|
||||
let lower = installer_file[position + 1];
|
||||
|
|
Loading…
Add table
Reference in a new issue