Skip to content

Commit

Permalink
compat: use WCHAR directly
Browse files Browse the repository at this point in the history
Instead of pretending it can be a CHAR, when the next call is
WideCharToMultiByte().
  • Loading branch information
robUx4 authored and chouquette committed Mar 20, 2019
1 parent f5a9f81 commit 1650b3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ os_strerror(int errnum, char *buf, size_t buflen)
case MDNS_LKPERR:
{
// Win32 gai_strerror returns a static buffer, but as a non-const char*
TCHAR *s = gai_strerror(errno);
WCHAR *s = gai_strerror(errno);
if (!WideCharToMultiByte(CP_UTF8, 0, s, -1, buf, buflen, NULL, NULL))
return (-1);
}
Expand Down

0 comments on commit 1650b3d

Please sign in to comment.