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

This commit is contained in:
Mikołaj Zalewski 2009-01-27 21:30:40 +01:00 committed by Alexandre Julliard
parent 1352f6d316
commit d31828b500
1 changed files with 1 additions and 0 deletions

View File

@ -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;