Francois Gouget : shlwapi: Fix the length returned by SHFormatDateTimeA().
Alexandre Julliard
julliard at winehq.org
Tue Aug 31 15:40:24 CDT 2021
Module: wine
Branch: master
Commit: c2391296b8e4ffca28364194198688063f714782
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c2391296b8e4ffca28364194198688063f714782
Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list