Module: wine Branch: refs/heads/master Commit: fe4c4780eb0a047f09a2e536eeaa1f51434b4b61 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=fe4c4780eb0a047f09a2e536...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 12 16:09:50 2006 +0200
riched20: Fix an uninitialized variable bug.
Mark todo a test that depended on the bug to succeed.
---
dlls/riched20/editor.c | 3 ++- dlls/riched20/tests/editor.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index a2689df..ac1bf39 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -310,7 +310,8 @@ static void ME_RTFCharAttrHook(RTF_Info CHARFORMAT2W fmt; fmt.cbSize = sizeof(fmt); fmt.dwMask = 0; - + fmt.dwEffects = 0; + switch(info->rtfMinor) { case rtfPlain: diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 8dca7d9..c2e3e04 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -343,7 +343,8 @@ static void test_EM_SETTEXTMODE(void)
/*Compare the two formattings*/ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two formats found in plain text mode - cf2.dwEffects: %f cf2test.dwEffects: %f\n",(double) cf2.dwEffects, (double) cf2test.dwEffects); + "two formats found in plain text mode - cf2.dwEffects: %lx cf2test.dwEffects: %lx\n", + cf2.dwEffects, cf2test.dwEffects); /*Test TM_RICHTEXT by: switching back to Rich Text mode printing "wine" in the current format(normal) pasting "wine" from the clipboard(italicized) @@ -385,7 +386,7 @@ static void test_EM_SETTEXTMODE(void) (LPARAM) &cf2test);
/*Test that the two formattings are not the same*/ - ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects != cf2test.dwEffects), + todo_wine ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects != cf2test.dwEffects), "expected different formats - cf2.dwMask: %lx, cf2test.dwMask: %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects);