From e7296eaeaab3fbeb5a643287162c42f8069026e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Sun, 28 Oct 2007 10:53:45 -0500 Subject: [PATCH] riched20: Fix test crash on WinXP-SP2. --- dlls/riched20/tests/editor.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 0c259b91311..3dfa28e7baa 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -1087,6 +1087,8 @@ static void test_EM_SETTEXTEX(void) getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1); @@ -1101,6 +1103,8 @@ static void test_EM_SETTEXTEX(void) getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2); SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); @@ -1117,6 +1121,8 @@ static void test_EM_SETTEXTEX(void) getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3); SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); @@ -1128,6 +1134,8 @@ static void test_EM_SETTEXTEX(void) getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt); SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); @@ -1139,6 +1147,8 @@ static void test_EM_SETTEXTEX(void) getText.codepage = 1200; /* no constant for unicode */ getText.cb = MAX_BUF_LEN; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; setText.flags = 0; SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4); SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf); @@ -1747,6 +1757,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "RichEdit1") == 0, "EM_GETTEXTEX results not what was set by EM_REPLACESEL\n"); @@ -1760,6 +1772,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "RichEdit1\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1779,6 +1793,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "RichEdit1\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1805,6 +1821,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "\r\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1821,6 +1839,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, " ") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1837,6 +1857,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "\r\r\r \r\r\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1853,6 +1875,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, " \r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1869,6 +1893,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, " \r\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1885,6 +1911,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "\rX\r\r\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1901,6 +1929,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "\r\r") == 0, "EM_GETTEXTEX returned incorrect string\n"); @@ -1917,6 +1947,8 @@ static void test_EM_REPLACESEL(void) getText.cb = 1024; getText.codepage = CP_ACP; getText.flags = GT_DEFAULT; + getText.lpDefaultChar = NULL; + getText.lpUsedDefaultChar = NULL; SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer); ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0, "EM_GETTEXTEX returned incorrect string\n");