Michael Stefaniuc : shlwapi/tests: Pass the correct buffer size to WideCharToMultiByte().

Alexandre Julliard julliard at winehq.org
Wed Jun 27 16:04:36 CDT 2018


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Tue Jun 26 22:44:27 2018 +0200

shlwapi/tests: Pass the correct buffer size to WideCharToMultiByte().

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shlwapi/tests/string.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c
index c7a2f5d..9114ad8 100644
--- a/dlls/shlwapi/tests/string.c
+++ b/dlls/shlwapi/tests/string.c
@@ -694,7 +694,7 @@ static void test_StrFormatKBSizeW(void)
   while(result->value)
   {
     pStrFormatKBSizeW(result->value, szBuffW, 256);
-    WideCharToMultiByte(CP_ACP,0,szBuffW,-1,szBuff,sizeof(szBuff)/sizeof(WCHAR),NULL,NULL);
+    WideCharToMultiByte(CP_ACP, 0, szBuffW, -1, szBuff, ARRAY_SIZE(szBuff), NULL, NULL);
 
     ok(!strcmp(result->kb_size, szBuff), "Formatted %s wrong: got %s, expected %s\n",
        wine_dbgstr_longlong(result->value), szBuff, result->kb_size);




More information about the wine-cvs mailing list