Francois Gouget : shlwapi: Fix the length returned by SHFormatDateTimeA().
Module: wine Branch: master Commit: c2391296b8e4ffca28364194198688063f714782 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c2391296b8e4ffca283641941... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Aug 31 14:57:44 2021 +0200 shlwapi: Fix the length returned by SHFormatDateTimeA(). The ANSI string may be longer than the Unicode one. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shlwapi/ordinal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index 52cc3b725fa..63945deaea3 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -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;
participants (1)
-
Alexandre Julliard