comctl32/tab: Fix invalid read of item data.

This commit is contained in:
Nikolay Sivov 2011-04-09 19:39:45 +04:00 committed by Alexandre Julliard
parent 6c710ae1ed
commit 6867735e20
2 changed files with 4 additions and 1 deletions

View File

@ -2500,7 +2500,7 @@ static void TAB_EnsureSelectionVisible(
if (infoPtr->leftmostVisible >= iSelected)
{
infoPtr->leftmostVisible = iSelected;
if (iSelected >= 0) infoPtr->leftmostVisible = iSelected;
}
else
{

View File

@ -1052,6 +1052,9 @@ static void test_insert_focus(HWND parent_wnd)
hTab = createFilledTabControl(parent_wnd, TCS_FIXEDWIDTH, mask, 0);
ok(hTab != NULL, "Failed to create tab control\n");
r = SendMessage(hTab, TCM_GETCURSEL, 0, 0);
expect(-1, r);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
nTabsRetrieved = SendMessage(hTab, TCM_GETITEMCOUNT, 0, 0);