From b683b541fa7c4ffd671807c5c463369c420bb7e7 Mon Sep 17 00:00:00 2001 From: Zhiyi Zhang Date: Mon, 19 Mar 2018 16:17:10 +0800 Subject: [PATCH] comctl32/datetime: Fix length passed to GetLocaleInfoW(). Fix fullday not being rendered when long date format is used. Signed-off-by: Zhiyi Zhang Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- 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 aa023578286..46ac3e5b5cf 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;