Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d0f75b59
Commit
d0f75b59
authored
Mar 08, 2007
by
Farshad Agah
Committed by
Alexandre Julliard
Mar 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: monthcal: Reject out of range dates in MCM_SETCURSEL.
parent
9a5c5178
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
monthcal.c
dlls/comctl32/monthcal.c
+2
-0
monthcal.c
dlls/comctl32/tests/monthcal.c
+3
-3
No files found.
dlls/comctl32/monthcal.c
View file @
d0f75b59
...
@@ -1038,6 +1038,8 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, LPARAM lParam)
...
@@ -1038,6 +1038,8 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, LPARAM lParam)
if
((
infoPtr
==
NULL
)
||
(
lpSel
==
NULL
))
return
FALSE
;
if
((
infoPtr
==
NULL
)
||
(
lpSel
==
NULL
))
return
FALSE
;
if
(
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
)
&
MCS_MULTISELECT
)
return
FALSE
;
if
(
GetWindowLongW
(
infoPtr
->
hwndSelf
,
GWL_STYLE
)
&
MCS_MULTISELECT
)
return
FALSE
;
if
(
!
MONTHCAL_ValidateTime
(
*
lpSel
))
return
FALSE
;
infoPtr
->
currentMonth
=
lpSel
->
wMonth
;
infoPtr
->
currentMonth
=
lpSel
->
wMonth
;
infoPtr
->
currentYear
=
lpSel
->
wYear
;
infoPtr
->
currentYear
=
lpSel
->
wYear
;
...
...
dlls/comctl32/tests/monthcal.c
View file @
d0f75b59
...
@@ -206,7 +206,7 @@ static void test_monthcal_currDate(HWND hwnd)
...
@@ -206,7 +206,7 @@ static void test_monthcal_currDate(HWND hwnd)
/* Overflow matters, check for wDay */
/* Overflow matters, check for wDay */
st_test
.
wDay
+=
4
;
st_test
.
wDay
+=
4
;
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
todo_wine
{
expect
(
0
,
res
);}
expect
(
0
,
res
);
/* correct wDay before checking for wMonth */
/* correct wDay before checking for wMonth */
st_test
.
wDay
-=
4
;
st_test
.
wDay
-=
4
;
...
@@ -215,7 +215,7 @@ static void test_monthcal_currDate(HWND hwnd)
...
@@ -215,7 +215,7 @@ static void test_monthcal_currDate(HWND hwnd)
/* Overflow matters, check for wMonth */
/* Overflow matters, check for wMonth */
st_test
.
wMonth
+=
4
;
st_test
.
wMonth
+=
4
;
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
res
=
SendMessage
(
hwnd
,
MCM_SETCURSEL
,
0
,
(
LPARAM
)
&
st_test
);
todo_wine
{
expect
(
0
,
res
);}
expect
(
0
,
res
);
/* checking if gets the information right, modify st_new */
/* checking if gets the information right, modify st_new */
st_new
.
wYear
+=
4
;
st_new
.
wYear
+=
4
;
...
@@ -231,7 +231,7 @@ static void test_monthcal_currDate(HWND hwnd)
...
@@ -231,7 +231,7 @@ static void test_monthcal_currDate(HWND hwnd)
/* st_new change to st_origin, above settings with overflow */
/* st_new change to st_origin, above settings with overflow */
/* should not change the current settings */
/* should not change the current settings */
expect
(
st_original
.
wYear
,
st_new
.
wYear
);
expect
(
st_original
.
wYear
,
st_new
.
wYear
);
todo_wine
{
expect
(
st_original
.
wMonth
,
st_new
.
wMonth
);}
expect
(
st_original
.
wMonth
,
st_new
.
wMonth
);
expect
(
st_original
.
wDay
,
st_new
.
wDay
);
expect
(
st_original
.
wDay
,
st_new
.
wDay
);
expect
(
st_original
.
wHour
,
st_new
.
wHour
);
expect
(
st_original
.
wHour
,
st_new
.
wHour
);
expect
(
st_original
.
wMinute
,
st_new
.
wMinute
);
expect
(
st_original
.
wMinute
,
st_new
.
wMinute
);
...
...
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