diff --git a/src/device.rs b/src/device.rs index 561b11fd..3e716604 100644 --- a/src/device.rs +++ b/src/device.rs @@ -266,7 +266,7 @@ impl Address { return None; } - match (*ptr).sa_family as u32 { + match (*ptr).sa_family as u16 { WinSock::AF_INET => { let ptr: *const WinSock::SOCKADDR_IN = std::mem::transmute(ptr); let addr: [u8; 4] = ((*ptr).sin_addr.S_un.S_addr).to_ne_bytes();