[vlc-devel] [PATCH] unc: fix wide char API call with chars
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 9 15:21:59 CEST 2019
On 2019-07-09 15:13, Hugo Beauzée-Luyssen wrote:
> On Tue, Jul 9, 2019, at 2:31 PM, Steve Lhomme wrote:
>> ---
>> modules/access/unc.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/modules/access/unc.c b/modules/access/unc.c
>> index cddf9c25af4..49b41af5fa8 100644
>> --- a/modules/access/unc.c
>> +++ b/modules/access/unc.c
>> @@ -54,7 +54,7 @@ static void Win32AddConnection(stream_t *access,
>> const char *server,
>> const char *share, const char *user,
>> const char *pwd, const char *domain)
>> {
>> - NETRESOURCE net_resource;
>> + NETRESOURCEA net_resource;
>> char remote_name[MAX_PATH];
>>
>> VLC_UNUSED(domain);
>> @@ -73,7 +73,7 @@ static void Win32AddConnection(stream_t *access,
>> const char *server,
>> const char *msg;
>> net_resource.lpRemoteName = remote_name;
>>
>> - switch (WNetAddConnection2(&net_resource, pwd, user, 0))
>> + switch (WNetAddConnection2A(&net_resource, pwd, user, 0))
>> {
>> case NO_ERROR:
>> msg = "connected to %s";
>
> Wouldn't using the W variant (and converting from utf8 to utf16) be the correct fix instead?
Indeed, there are already some ToWide() calls before.
More information about the vlc-devel
mailing list