Gerald Pfeifer : riched20: Properly clear all of a buffer of type WCHAR.
Module: wine Branch: master Commit: 8fb1802b9c07eabd5740107d33ac7c851a1e2f20 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8fb1802b9c07eabd5740107d33... Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Tue May 10 09:57:39 2016 -0500 riched20: Properly clear all of a buffer of type WCHAR. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/tests/editor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index ae9c0a5..6a77d9a 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -3822,7 +3822,7 @@ static void test_EM_SETTEXTEX(void) getText.flags = GT_DEFAULT; getText.lpDefaultChar = NULL; getText.lpUsedDefChar = NULL; - memset(buf, 0, MAX_BUF_LEN); + memset(buf, 0, sizeof(buf)); SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); ok(lstrcmpW(buf, TestItem2) == 0, "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n"); @@ -3837,7 +3837,7 @@ static void test_EM_SETTEXTEX(void) getText.flags = GT_USECRLF; /* <-- asking for CR -> CRLF conversion */ getText.lpDefaultChar = NULL; getText.lpUsedDefChar = NULL; - memset(buf, 0, MAX_BUF_LEN); + memset(buf, 0, sizeof(buf)); SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); ok(lstrcmpW(buf, TestItem1) == 0, "EM_GETTEXTEX results not what was set by EM_SETTEXTEX\n");
participants (1)
-
Alexandre Julliard