diff --git a/zbus/src/win32.rs b/zbus/src/win32.rs index 24e1236df..f75e31e1b 100644 --- a/zbus/src/win32.rs +++ b/zbus/src/win32.rs @@ -214,7 +214,7 @@ pub fn socket_addr_get_pid(addr: &SocketAddr) -> Result { let tcp_table = tcp_table.as_mut_ptr().cast::(); let num_entries = unsafe { (*tcp_table).dwNumEntries }; for i in 0..num_entries { - let entry = unsafe { (*tcp_table).table.get_unchecked(i as usize) }; + let entry = unsafe { *(*tcp_table).table.as_ptr().add(i as usize) }; let port = (entry.dwLocalPort & 0xFFFF) as u16; let port = u16::from_be(port);