mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 19:09:52 +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:
parent
6a7883b5fe
commit
cc5d68a7c3
@ -56,7 +56,7 @@ bool Win32UPnPAddPort(UINT outside_port, UINT inside_port, bool udp, char *local
|
|||||||
IUPnPNAT *nat = NULL;
|
IUPnPNAT *nat = NULL;
|
||||||
wchar_t ip_str[MAX_SIZE];
|
wchar_t ip_str[MAX_SIZE];
|
||||||
BSTR bstr_ip, bstr_description, bstr_protocol;
|
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
|
// Validate arguments
|
||||||
if (outside_port == 0 || outside_port >= 65536 || inside_port == 0 || inside_port >= 65536 ||
|
if (outside_port == 0 || outside_port >= 65536 || inside_port == 0 || inside_port >= 65536 ||
|
||||||
IsEmptyStr(local_ip) || UniIsEmptyStr(description))
|
IsEmptyStr(local_ip) || UniIsEmptyStr(description))
|
||||||
|
Loading…
Reference in New Issue
Block a user