From 7ea77a0047e2197c36519772f23a0ba9b5cc11ae Mon Sep 17 00:00:00 2001 From: spaceface777 Date: Tue, 30 Jun 2020 19:51:07 +0200 Subject: [PATCH] vschannel: fix net segfault on Windows (#5587) --- thirdparty/vschannel/vschannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/vschannel/vschannel.c b/thirdparty/vschannel/vschannel.c index f231b8a73e..aed9d3dada 100644 --- a/thirdparty/vschannel/vschannel.c +++ b/thirdparty/vschannel/vschannel.c @@ -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(),