Skip to content

Commit

Permalink
bypass whole addst_flag hook in win
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Mar 8, 2024
1 parent ceaed5d commit 4ce4f9c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,10 @@ fn addst_top(gps: usize, src: *const u8, justify: u8, space: u32) {
}
}

#[cfg_attr(target_os = "windows", hook(by_offset))]
#[cfg_attr(target_os = "windows", hook(bypass))]
#[cfg_attr(target_os = "linux", hook(by_symbol))]
fn addst_flag(gps: usize, src: *const u8, a3: usize, a4: usize, flag: u32) {
unsafe {
#[cfg(target_os = "windows")]
{
return original!(gps, src, a3, a4, flag);
}

let s = CxxString::from_ptr(src);
match s.to_bytes_without_nul() {
converted => match DICTIONARY.get(converted) {
Expand Down

0 comments on commit 4ce4f9c

Please sign in to comment.