1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 18:19:53 +03:00

Cedar/Win32Com.cpp: fix non-const wchar_t array literal initialization error

error: cannot initialize a variable of type 'wchar_t *' with an lvalue of type 'const wchar_t [4]'
        wchar_t *protocol_str = (udp ? L"UDP" : L"TCP");
                 ^              ~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Davide Beatrici 2020-08-16 00:58:18 +02:00
parent 6a7883b5fe
commit cc5d68a7c3

View File

@ -56,7 +56,7 @@ bool Win32UPnPAddPort(UINT outside_port, UINT inside_port, bool udp, char *local
IUPnPNAT *nat = NULL;
wchar_t ip_str[MAX_SIZE];
BSTR bstr_ip, bstr_description, bstr_protocol;
wchar_t *protocol_str = (udp ? L"UDP" : L"TCP");
const wchar_t *protocol_str = (udp ? L"UDP" : L"TCP");
// Validate arguments
if (outside_port == 0 || outside_port >= 65536 || inside_port == 0 || inside_port >= 65536 ||
IsEmptyStr(local_ip) || UniIsEmptyStr(description))