From 05c730fd4c0b80a9cb1b5bc3a955ef5a53a01ef0 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Fri, 31 Jul 2009 11:37:13 -0400 Subject: [PATCH] richedit: Prevent using uninitialized nAvailWidth in initialization. --- dlls/riched20/editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 302ee11848b..ff26265b0f4 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2602,6 +2602,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ES_AUTOHSCROLL|ES_DISABLENOSCROLL); ed->pBuffer = ME_MakeText(); ed->nZoomNumerator = ed->nZoomDenominator = 0; + ed->nAvailWidth = 0; /* wrap to client area */ ME_MakeFirstParagraph(ed); /* The four cursors are for: * 0 - The position where the caret is shown @@ -2634,7 +2635,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->nParagraphs = 1; ed->nLastSelStart = ed->nLastSelEnd = 0; ed->pLastSelStartPara = ed->pLastSelEndPara = ME_FindItemFwd(ed->pBuffer->pFirst, diParagraph); - ed->nAvailWidth = 0; /* wrap to client area */ ed->bHideSelection = FALSE; ed->pfnWordBreak = NULL; ed->lpOleCallback = NULL; -- 2.11.4.GIT