Marcus Meissner : kernel32: GetCalendarInfoW gets character sizes.

Alexandre Julliard julliard at winehq.org
Tue Jun 26 15:43:10 CDT 2018


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

Author: Marcus Meissner <meissner at suse.de>
Date:   Tue Jun 26 15:49:02 2018 +0200

kernel32: GetCalendarInfoW gets character sizes.

Signed-off-by: Marcus Meissner <meissner at suse.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 e6e779c..8bbad2b 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 );




More information about the wine-cvs mailing list