X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=utf8.cpp;h=ba451e00f084d947c914963c0f3f7a913b04ded2;hb=ee9a86c8408feaf173733aea12a80211e5d74483;hp=3f71bd7e5e08ea360a6ebd79bdec822682673d8d;hpb=72ffbfb8a4ebd43fcba127604e76aa0027882117;p=nssm.git diff --git a/utf8.cpp b/utf8.cpp index 3f71bd7..ba451e0 100644 --- a/utf8.cpp +++ b/utf8.cpp @@ -48,7 +48,7 @@ int to_utf8(const wchar_t *utf16, char **utf8, unsigned long *utf8len) { *utf8 = (char *) HeapAlloc(GetProcessHeap(), 0, size); if (! *utf8) return 2; - if (! WideCharToMultiByte(CP_UTF8, 0, utf16, -1, (LPSTR) utf8, size, NULL, NULL)) { + if (! WideCharToMultiByte(CP_UTF8, 0, utf16, -1, *utf8, size, NULL, NULL)) { HeapFree(GetProcessHeap(), 0, *utf8); *utf8 = 0; return 3;