[vlc-devel] [PATCH] unc: fix wide char API call with chars

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Jul 9 15:13:17 CEST 2019


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?

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list