Detlef Riekenberg : comctl32: Do not crash when the startpage is invalid.
Module: wine Branch: master Commit: e089659af1dfba75fd146e5890351b256992c25e URL: http://source.winehq.org/git/wine.git/?a=commit;h=e089659af1dfba75fd146e5890... Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Fri Dec 1 00:50:31 2006 +0100 comctl32: Do not crash when the startpage is invalid. --- dlls/comctl32/propsheet.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index 7261d19..8490d74 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -2824,6 +2824,9 @@ INT_PTR WINAPI PropertySheetA(LPCPROPSHE } } + if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0; + TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages); + psInfo->unicode = FALSE; psInfo->ended = FALSE; @@ -2875,6 +2878,9 @@ INT_PTR WINAPI PropertySheetW(LPCPROPSHE } } + if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0; + TRACE("startpage: %d of %d pages\n", psInfo->active_page, psInfo->nPages); + psInfo->unicode = TRUE; psInfo->ended = FALSE;
participants (1)
-
Alexandre Julliard