mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
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:
parent
d2ace6addd
commit
d3a52c2890
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue