@@ -82,13 +82,13 @@ fn getaddrinfo(emu: &mut emu::Emu) {
8282 . expect ( "ws2_32!getaddrinfo cannot read result_ptr_ptr" ) ;
8383
8484 let node_name = if node_name_ptr != 0 {
85- emu. maps . read_string ( node_name_ptr)
85+ emu. maps . read_string ( node_name_ptr as u64 )
8686 } else {
8787 "NULL" . to_string ( )
8888 } ;
8989
9090 let service_name = if service_name_ptr != 0 {
91- emu. maps . read_string ( service_name_ptr)
91+ emu. maps . read_string ( service_name_ptr as u64 )
9292 } else {
9393 "NULL" . to_string ( )
9494 } ;
@@ -102,10 +102,10 @@ fn getaddrinfo(emu: &mut emu::Emu) {
102102 let mut hints_protocol = 0 ;
103103
104104 if hints_ptr != 0 {
105- hints_flags = emu. maps . read_dword ( hints_ptr) . unwrap_or ( 0 ) as i32 ;
106- hints_family = emu. maps . read_dword ( hints_ptr + 4 ) . unwrap_or ( 0 ) as i32 ;
107- hints_socktype = emu. maps . read_dword ( hints_ptr + 8 ) . unwrap_or ( 0 ) as i32 ;
108- hints_protocol = emu. maps . read_dword ( hints_ptr + 12 ) . unwrap_or ( 0 ) as i32 ;
105+ hints_flags = emu. maps . read_dword ( hints_ptr as u64 ) . unwrap_or ( 0 ) as i32 ;
106+ hints_family = emu. maps . read_dword ( ( hints_ptr + 4 ) as u64 ) . unwrap_or ( 0 ) as i32 ;
107+ hints_socktype = emu. maps . read_dword ( ( hints_ptr + 8 ) as u64 ) . unwrap_or ( 0 ) as i32 ;
108+ hints_protocol = emu. maps . read_dword ( ( hints_ptr + 12 ) as u64 ) . unwrap_or ( 0 ) as i32 ;
109109 }
110110
111111 // Create a dummy ADDRINFO structure
@@ -167,7 +167,7 @@ fn getaddrinfo(emu: &mut emu::Emu) {
167167 emu. maps . write_qword ( addrinfo_addr + 40 , 0 ) ;
168168
169169 // Store the result pointer in the ppResult parameter
170- emu. maps . write_qword ( result_ptr_ptr, addrinfo_addr) ;
170+ emu. maps . write_qword ( result_ptr_ptr as u64 , addrinfo_addr) ;
171171
172172 log:: info!( "\t created dummy ADDRINFO for {}:{} at 0x{:x}" , node_name, service_name, addrinfo_addr) ;
173173 log:: info!( "\t sockaddr at 0x{:x}, canonname at 0x{:x}" , sockaddr_addr, canonname_addr) ;
0 commit comments