Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
4d1fca24
Commit
4d1fca24
authored
14 years ago
by
Esme Povirk
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
comctl32: Use current month and year when checking day of month.
parent
02480a90
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/comctl32/datetime.c
+2
-1
2 additions, 1 deletion
dlls/comctl32/datetime.c
dlls/comctl32/tests/datetime.c
+9
-0
9 additions, 0 deletions
dlls/comctl32/tests/datetime.c
with
11 additions
and
1 deletion
dlls/comctl32/datetime.c
+
2
−
1
View file @
4d1fca24
...
...
@@ -167,7 +167,8 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, const SYSTEMTIME *sy
if
(
flag
==
GDT_VALID
)
{
if
(
systime
->
wYear
<
1601
||
systime
->
wYear
>
30827
||
systime
->
wMonth
<
1
||
systime
->
wMonth
>
12
||
systime
->
wDay
<
1
||
systime
->
wDay
>
31
||
systime
->
wDay
<
1
||
systime
->
wDay
>
MONTHCAL_MonthLength
(
systime
->
wMonth
,
systime
->
wYear
)
||
systime
->
wHour
>
23
||
systime
->
wMinute
>
59
||
systime
->
wSecond
>
59
||
...
...
This diff is collapsed.
Click to expand it.
dlls/comctl32/tests/datetime.c
+
9
−
0
View file @
4d1fca24
...
...
@@ -600,6 +600,15 @@ static void test_dtm_set_and_get_system_time(void)
r
=
SendMessage
(
hWnd
,
DTM_GETSYSTEMTIME
,
0
,
(
LPARAM
)
&
getSt
);
expect
(
GDT_VALID
,
r
);
expect_systime
(
&
ref
,
&
getSt
);
/* day invalid for current month */
st
=
ref
;
st
.
wDay
=
30
;
st
.
wMonth
=
2
;
r
=
SendMessage
(
hWnd
,
DTM_SETSYSTEMTIME
,
GDT_VALID
,
(
LPARAM
)
&
st
);
expect
(
0
,
r
);
r
=
SendMessage
(
hWnd
,
DTM_GETSYSTEMTIME
,
0
,
(
LPARAM
)
&
getSt
);
expect
(
GDT_VALID
,
r
);
expect_systime
(
&
ref
,
&
getSt
);
/* day of week isn't validated */
st
=
ref
;
st
.
wDayOfWeek
=
10
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment