winhelp.c: Zero out WINHELP_WINDOW in alloc

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Feb 18 13:07:08 CST 2006


Changelog:
	wine/programs/winhelp/winhelp.c: WINHELP_CreateHelpWindow()
	Zero out histIndex and backIndex too before calling any other
	function

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/programs/winhelp/winhelp.c
===================================================================
RCS file: /home/wine/wine/programs/winhelp/winhelp.c,v
retrieving revision 1.39
diff -u -r1.39 winhelp.c
--- wine/programs/winhelp/winhelp.c	19 Dec 2005 20:26:28 -0000	1.39
+++ wine/programs/winhelp/winhelp.c	18 Feb 2006 19:01:04 -0000
@@ -485,7 +485,7 @@
     bPopup = wi->win_style & WS_POPUP;
 
     /* Initialize WINHELP_WINDOW struct */
-    win = HeapAlloc(GetProcessHeap(), 0,
+    win = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
                     sizeof(WINHELP_WINDOW) + strlen(wi->name) + 1);
     if (!win) return FALSE;
 
@@ -496,13 +496,6 @@
     lstrcpy((char*)win->lpszName, wi->name);
 
     win->page = page;
-    win->first_button = 0;
-    win->first_line = 0;
-    win->hMainWnd = 0;
-    win->hButtonBoxWnd = 0;
-    win->hTextWnd = 0;
-    win->hShadowWnd = 0;
-    win->hHistoryWnd = 0;
 
     win->hArrowCur = LoadCursorA(0, (LPSTR)IDC_ARROW);
     win->hHandCur = LoadCursorA(0, (LPSTR)IDC_HAND);
@@ -539,7 +532,6 @@
             MACRO_ExecuteMacro(macro->lpszMacro);
     }
 
-    win->histIndex = win->backIndex = 0;
     /* Reuse existing window */
     if (!bPopup)
     {



More information about the wine-patches mailing list