shlwapi: Fix the length returned by SHFormatDateTimeA().

The ANSI string may be longer than the Unicode one.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2021-08-31 14:57:44 +02:00 committed by Alexandre Julliard
parent 312dc76c75
commit c2391296b8
1 changed files with 1 additions and 1 deletions

View File

@ -4360,7 +4360,7 @@ INT WINAPI SHFormatDateTimeA(const FILETIME UNALIGNED *fileTime, DWORD *flags,
retval = SHFormatDateTimeW(fileTime, flags, bufW, size);
if (retval != 0)
WideCharToMultiByte(CP_ACP, 0, bufW, -1, buf, size, NULL, NULL);
retval = WideCharToMultiByte(CP_ACP, 0, bufW, -1, buf, size, NULL, NULL);
HeapFree(GetProcessHeap(), 0, bufW);
return retval;