1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-25 22:07:44 +00:00

Fix compilation for execlookup

This commit is contained in:
Joshua Goins 2024-04-19 19:14:07 -04:00
parent b4fe74cf7d
commit 60d6382fbf

View file

@ -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];