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
9de240bd
Commit
9de240bd
authored
Mar 08, 2012
by
Owen Rudge
Committed by
Alexandre Julliard
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/datetime: Don't allow an invalid year to be typed in.
parent
3f932308
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
datetime.c
dlls/comctl32/datetime.c
+13
-0
No files found.
dlls/comctl32/datetime.c
View file @
9de240bd
...
...
@@ -847,6 +847,7 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
int
fieldNum
=
infoPtr
->
select
&
DTHT_DATEFIELD
;
int
i
,
val
=
0
,
clamp_day
=
0
;
SYSTEMTIME
date
=
infoPtr
->
date
;
int
oldyear
;
if
(
infoPtr
->
select
==
-
1
||
infoPtr
->
nCharsEntered
==
0
)
return
;
...
...
@@ -859,13 +860,25 @@ DATETIME_ApplySelectedField (DATETIME_INFO *infoPtr)
switch
(
infoPtr
->
fieldspec
[
fieldNum
])
{
case
ONEDIGITYEAR
:
case
TWODIGITYEAR
:
oldyear
=
date
.
wYear
;
date
.
wYear
=
date
.
wYear
-
(
date
.
wYear
%
100
)
+
val
;
if
(
DATETIME_IsDateInValidRange
(
infoPtr
,
&
date
))
clamp_day
=
1
;
else
date
.
wYear
=
oldyear
;
break
;
case
INVALIDFULLYEAR
:
case
FULLYEAR
:
oldyear
=
date
.
wYear
;
date
.
wYear
=
val
;
if
(
DATETIME_IsDateInValidRange
(
infoPtr
,
&
date
))
clamp_day
=
1
;
else
date
.
wYear
=
oldyear
;
break
;
case
ONEDIGITMONTH
:
case
TWODIGITMONTH
:
...
...
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