Skip to content

Commit

Permalink
📝 fix windows struct offset
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Feb 25, 2025
1 parent f31fd80 commit b9dae54
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/io/sys/windows/miow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,7 @@ impl AcceptAddrsBuf {

#[allow(deref_nullptr)]
fn args(&self) -> (*mut std::ffi::c_void, u32, u32, u32) {
let remote_offset =
unsafe { &(*(std::ptr::null::<AcceptAddrsBuf>())).remote as *const _ as usize };
let remote_offset = std::mem::offset_of!(AcceptAddrsBuf, remote);
(
self as *const _ as *mut _,
0,
Expand Down

0 comments on commit b9dae54

Please sign in to comment.