Skip to content

Commit

Permalink
bypass addst_flag on win for now
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Mar 7, 2024
1 parent c8e8f2a commit ceaed5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tab_spaces = 2
chain_width = 120
max_width = 120
reorder_imports = true
5 changes: 5 additions & 0 deletions src/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ fn addst_top(gps: usize, src: *const u8, justify: u8, space: u32) {
#[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
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ extern "C" fn detach() {

#[no_mangle]
extern "C" fn super_secret_dfint_sign() -> u8 {
return 69;
69
}

0 comments on commit ceaed5d

Please sign in to comment.