[PATCH] comctl32: toolbar: make sure all TBUTTON_INFO fields are initialized when a button is added in the middle

Mikołaj Zalewski mikolaj at zalewski.pl
Tue Jan 27 14:30:40 CST 2009


---
 dlls/comctl32/toolbar.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 1ca9c8f..df5b19d 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3789,6 +3789,7 @@ TOOLBAR_InsertButtonT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
 	    (infoPtr->nNumButtons - nIndex - 1) * sizeof(TBUTTON_INFO));
 
     /* insert new button */
+    ZeroMemory(&infoPtr->buttons[nIndex], sizeof(infoPtr->buttons[nIndex]));
     infoPtr->buttons[nIndex].iBitmap   = lpTbb->iBitmap;
     infoPtr->buttons[nIndex].idCommand = lpTbb->idCommand;
     infoPtr->buttons[nIndex].fsState   = lpTbb->fsState;
-- 
1.5.4


--------------040308010204030602040805--



More information about the wine-patches mailing list