When the commandID was being treated as the index, no check for index

greater than number of buttons was done. Now fixed.
This commit is contained in:
Guy L. Albertelli 2002-02-12 18:43:56 +00:00 committed by Alexandre Julliard
parent d2ace6addd
commit d3a52c2890

View file

@ -1332,6 +1332,7 @@ TOOLBAR_GetButtonIndex (TOOLBAR_INFO *infoPtr, INT idCommand, BOOL CommandIsInde
if (CommandIsIndex) {
TRACE("command is really index command=%d\n", idCommand);
if (idCommand >= infoPtr->nNumButtons) return -1;
return idCommand;
}
btnPtr = infoPtr->buttons;