vschannel: fix net segfault on Windows (#5587)

pull/5588/head
spaceface777 2020-06-30 19:51:07 +02:00 committed by GitHub
parent 3fed6ca050
commit 7ea77a0047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ static INT connect_to_server(TlsContext *tls_ctx, LPWSTR host, INT port_number)
WCHAR service_name[10];
int res = wsprintf(service_name, L"%d", port_number);
if(WSAConnectByNameA(Socket,connect_name, service_name, &local_address_length,
if(WSAConnectByNameW(Socket,connect_name, service_name, &local_address_length,
&local_address, &remote_address_length, &remote_address, &tv, NULL) == SOCKET_ERROR) {
wprintf(L"Error %d connecting to \"%s\" (%s)\n",
WSAGetLastError(),