Win32: use fputws instead of ToANSI+fputs

This commit is contained in:
Jean-Baptiste Kempf 2013-03-20 00:10:06 +01:00
parent 1abf871cee
commit 7c093d51ef
1 changed files with 4 additions and 5 deletions

View File

@ -81,12 +81,11 @@ int utf8_vfprintf( FILE *stream, const char *fmt, va_list ap )
}
}
#endif
char *ansi = ToANSI (str);
if (ansi != NULL)
wchar_t *wide = ToWide(str);
if (likely(wide != NULL))
{
fputs (ansi, stream);
free (ansi);
res = fputws(wide, stream);
free(wide);
}
else
res = -1;