Mikołaj Zalewski : comctl32: toolbar: Make sure all TBUTTON_INFO fields are initialized when a button is added in the middle .

Alexandre Julliard julliard at winehq.org
Wed Jan 28 08:02:55 CST 2009


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

Author: Mikołaj Zalewski <mikolaj at zalewski.pl>
Date:   Tue Jan 27 21:30:40 2009 +0100

comctl32: toolbar: Make sure all TBUTTON_INFO fields are initialized when a button is added in the middle.

---

 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;




More information about the wine-cvs mailing list