[v2] riched20: Properly clear all of a buffer of type WCHAR. WCHAR.
Gerald Pfeifer
gerald at pfeifer.com
Tue May 10 06:53:45 CDT 2016
Per Huw's preference (when I offered an alternate approach), this now
properly clears this buffer (which is of type WCHAR, so MAX_BUF_LEN
fell short).
Signed-off-by: Gerald Pfeifer <gerald at pfeifer.com>
---
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..3678b95 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");
--
2.8.1
More information about the wine-patches
mailing list