Commit f94159cd authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Don't get confused if PSN_SETACTIVE returns a positive number that

isn't a resource id.
parent b37adfb4
...@@ -2028,18 +2028,24 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg, ...@@ -2028,18 +2028,24 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
index+=skipdir; index+=skipdir;
if (index < 0) { if (index < 0) {
index = 0; index = 0;
FIXME("Tried to skip before first property sheet page!\n"); WARN("Tried to skip before first property sheet page!\n");
break; break;
} }
if (index >= psInfo->nPages) { if (index >= psInfo->nPages) {
FIXME("Tried to skip after last property sheet page!\n"); WARN("Tried to skip after last property sheet page!\n");
index = psInfo->nPages-1; index = psInfo->nPages-1;
break; break;
} }
} }
else if (result != 0) else if (result != 0)
{ {
int old_index = index;
index = PROPSHEET_FindPageByResId(psInfo, result); index = PROPSHEET_FindPageByResId(psInfo, result);
if(index >= psInfo->nPages) {
index = old_index;
WARN("Tried to skip to nonexistant page by res id\n");
break;
}
continue; continue;
} }
} }
......
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