Commit d3a52c28 authored by Guy L. Albertelli's avatar Guy L. Albertelli Committed by Alexandre Julliard

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

greater than number of buttons was done. Now fixed.
parent d2ace6ad
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment