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

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

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2018-03-19 16:17:10 +08:00 committed by Alexandre Julliard
parent 46dcf0c7cb
commit b683b541fa
1 changed files with 1 additions and 1 deletions

View File

@ -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;