Zhiyi Zhang : comctl32/datetime: Fix length passed to GetLocaleInfoW().

Alexandre Julliard julliard at winehq.org
Mon Mar 19 18:32:50 CDT 2018


Module: wine
Branch: master
Commit: b683b541fa7c4ffd671807c5c463369c420bb7e7
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b683b541fa7c4ffd671807c5c463369c420bb7e7

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Mon Mar 19 16:17:10 2018 +0800

comctl32/datetime: Fix length passed to GetLocaleInfoW().

Fix fullday not being rendered when long date format is used.

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/comctl32/datetime.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index aa02357..46ac3e5 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -697,7 +697,7 @@ DATETIME_ReturnFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int count, SHO
 		for (i = 0; i < max_count; i++)
 		{
 		    if(GetLocaleInfoW(LOCALE_USER_DEFAULT, lctype + i,
-			buffer, lstrlenW(buffer)))
+			buffer, ARRAY_SIZE(buffer)))
 		    {
 			GetTextExtentPoint32W(hdc, buffer, lstrlenW(buffer), &size);
 			if (size.cx > cx) cx = size.cx;




More information about the wine-cvs mailing list