From 0807725f41226a7573b82b756de0a118f02ae9c4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 26 Jun 2018 15:49:02 +0200 Subject: [PATCH] kernel32: GetCalendarInfoW gets character sizes. Signed-off-by: Marcus Meissner Signed-off-by: Alexandre Julliard --- dlls/kernel32/tests/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/time.c b/dlls/kernel32/tests/time.c index e6e779c703c..8bbad2b8a2a 100644 --- a/dlls/kernel32/tests/time.c +++ b/dlls/kernel32/tests/time.c @@ -697,7 +697,7 @@ static void test_GetCalendarInfo(void) ok( ret == 5, "wrong size %u\n", ret ); ok( atoi( bufferA ) == val1, "wrong value %s/%u\n", bufferA, val1 ); - ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferW, sizeof(bufferW), NULL ); + ret = pGetCalendarInfoW( 0x0409, CAL_GREGORIAN, CAL_ITWODIGITYEARMAX, bufferW, ARRAY_SIZE(bufferW), NULL ); ok( ret, "GetCalendarInfoW failed err %u\n", GetLastError() ); ok( ret == 5, "wrong size %u\n", ret ); memset( bufferA, 0x55, sizeof(bufferA) ); @@ -731,7 +731,7 @@ static void test_GetCalendarInfo(void) ok( ret == ret2, "got %d, expected %d\n", ret2, ret ); ret2 = pGetCalendarInfoW( LANG_SYSTEM_DEFAULT, CAL_GREGORIAN, CAL_SDAYNAME1, - bufferW, sizeof(bufferW), NULL); + bufferW, ARRAY_SIZE(bufferW), NULL); ok( ret2, "GetCalendarInfoW failed err %u\n", GetLastError() ); ret2 = WideCharToMultiByte( CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL ); ok( ret == ret2, "got %d, expected %d\n", ret, ret2 );