Dylan Smith : richedit: Prevent using uninitialized nAvailWidth in initialization.

Alexandre Julliard julliard at winehq.org
Mon Aug 3 11:15:26 CDT 2009


Module: wine
Branch: master
Commit: 05c730fd4c0b80a9cb1b5bc3a955ef5a53a01ef0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=05c730fd4c0b80a9cb1b5bc3a955ef5a53a01ef0

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Fri Jul 31 11:37:13 2009 -0400

richedit: Prevent using uninitialized nAvailWidth in initialization.

---

 dlls/riched20/editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 302ee11..ff26265 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;




More information about the wine-cvs mailing list