Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7d487c91
Commit
7d487c91
authored
Nov 13, 1999
by
Adrian Thurston
Committed by
Alexandre Julliard
Nov 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added validations for page index before using it.
parent
2d06944f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
14 deletions
+33
-14
propsheet.c
dlls/comctl32/propsheet.c
+33
-14
No files found.
dlls/comctl32/propsheet.c
View file @
7d487c91
...
...
@@ -1021,6 +1021,9 @@ static BOOL PROPSHEET_Back(HWND hwndDlg)
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
if
(
psInfo
->
active_page
<=
0
)
return
FALSE
;
hdr
.
hwndFrom
=
hwndDlg
;
hdr
.
code
=
PSN_WIZBACK
;
...
...
@@ -1053,6 +1056,9 @@ static BOOL PROPSHEET_Next(HWND hwndDlg)
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
if
(
psInfo
->
active_page
<
0
||
psInfo
->
active_page
==
psInfo
->
nPages
-
1
)
return
FALSE
;
hdr
.
hwndFrom
=
hwndDlg
;
hdr
.
code
=
PSN_WIZNEXT
;
...
...
@@ -1084,6 +1090,9 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
if
(
psInfo
->
active_page
<
0
)
return
FALSE
;
hdr
.
hwndFrom
=
hwndDlg
;
hdr
.
code
=
PSN_WIZFINISH
;
...
...
@@ -1116,6 +1125,9 @@ static BOOL PROPSHEET_Apply(HWND hwndDlg)
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
if
(
psInfo
->
active_page
<
0
)
return
FALSE
;
hdr
.
hwndFrom
=
hwndDlg
;
/*
...
...
@@ -1152,9 +1164,13 @@ static void PROPSHEET_Cancel(HWND hwndDlg)
{
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
HWND
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
HWND
hwndPage
;
NMHDR
hdr
;
if
(
psInfo
->
active_page
<
0
)
return
;
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
hdr
.
hwndFrom
=
hwndDlg
;
hdr
.
code
=
PSN_QUERYCANCEL
;
...
...
@@ -1178,9 +1194,13 @@ static void PROPSHEET_Help(HWND hwndDlg)
{
PropSheetInfo
*
psInfo
=
(
PropSheetInfo
*
)
GetPropA
(
hwndDlg
,
PropSheetInfoStr
);
HWND
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
HWND
hwndPage
;
NMHDR
hdr
;
if
(
psInfo
->
active_page
<
0
)
return
;
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
hdr
.
hwndFrom
=
hwndDlg
;
hdr
.
code
=
PSN_HELP
;
...
...
@@ -1301,9 +1321,8 @@ static BOOL PROPSHEET_CanSetCurSel(HWND hwndDlg)
HWND
hwndPage
;
NMHDR
hdr
;
if
(
!
psInfo
)
return
FALSE
;
if
(
!
psInfo
||
psInfo
->
active_page
<
0
)
return
FALSE
;
/*
* Notify the current page.
*/
...
...
@@ -1328,6 +1347,9 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
HWND
hwndHelp
=
GetDlgItem
(
hwndDlg
,
IDHELP
);
NMHDR
hdr
;
if
(
psInfo
->
active_page
<
0
)
return
FALSE
;
hwndPage
=
psInfo
->
proppage
[
psInfo
->
active_page
].
hwndPage
;
hdr
.
hwndFrom
=
hwndDlg
;
...
...
@@ -1335,14 +1357,12 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
* hpage takes precedence over index.
*/
if
(
hpage
!=
NULL
)
{
index
=
PROPSHEET_GetPageIndex
(
hpage
,
psInfo
);
if
(
index
==
-
1
)
{
TRACE
(
"Could not find page to remove!
\n
"
);
return
FALSE
;
}
if
(
index
<
0
||
index
>=
psInfo
->
nPages
)
{
TRACE
(
"Could not find page to select!
\n
"
);
return
FALSE
;
}
hwndPage
=
psInfo
->
proppage
[
index
].
hwndPage
;
...
...
@@ -1804,6 +1824,8 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND
hwndTabCtrl
=
GetDlgItem
(
hwnd
,
IDC_TABCONTROL
);
LPCPROPSHEETPAGEA
ppshpage
;
SetPropA
(
hwnd
,
PropSheetInfoStr
,
(
HANDLE
)
psInfo
);
/*
* Small icon in the title bar.
*/
...
...
@@ -1868,9 +1890,6 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
if
(
!
(
psInfo
->
ppshheader
->
dwFlags
&
PSH_WIZARD
))
SendMessageA
(
hwndTabCtrl
,
TCM_SETCURSEL
,
psInfo
->
active_page
,
0
);
SetPropA
(
hwnd
,
PropSheetInfoStr
,
(
HANDLE
)
psInfo
);
if
(
!
HIWORD
(
psInfo
->
ppshheader
->
pszCaption
)
&&
psInfo
->
ppshheader
->
hInstance
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment