Commit 6867735e authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/tab: Fix invalid read of item data.

parent 6c710ae1
......@@ -2500,7 +2500,7 @@ static void TAB_EnsureSelectionVisible(
if (infoPtr->leftmostVisible >= iSelected)
{
infoPtr->leftmostVisible = iSelected;
if (iSelected >= 0) infoPtr->leftmostVisible = iSelected;
}
else
{
......
......@@ -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);
......
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