Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
4a4d72f9
Commit
4a4d72f9
authored
May 01, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of invalid string in chrono formatting
parent
b3cc9c05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
include/fmt/chrono.h
include/fmt/chrono.h
+3
-3
No files found.
include/fmt/chrono.h
View file @
4a4d72f9
...
@@ -593,12 +593,12 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
...
@@ -593,12 +593,12 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
FMT_CONSTEXPR
parse_range
do_parse
(
basic_parse_context
<
Char
>&
ctx
)
{
FMT_CONSTEXPR
parse_range
do_parse
(
basic_parse_context
<
Char
>&
ctx
)
{
auto
begin
=
ctx
.
begin
(),
end
=
ctx
.
end
();
auto
begin
=
ctx
.
begin
(),
end
=
ctx
.
end
();
if
(
begin
==
end
)
return
{
begin
,
end
};
if
(
begin
==
end
||
*
begin
==
'}'
)
return
{
begin
,
begin
};
spec_handler
handler
{
*
this
,
ctx
,
format_str
};
spec_handler
handler
{
*
this
,
ctx
,
format_str
};
begin
=
internal
::
parse_align
(
begin
,
end
,
handler
);
begin
=
internal
::
parse_align
(
begin
,
end
,
handler
);
if
(
begin
==
end
)
return
{
begin
,
end
};
if
(
begin
==
end
)
return
{
begin
,
begin
};
begin
=
internal
::
parse_width
(
begin
,
end
,
handler
);
begin
=
internal
::
parse_width
(
begin
,
end
,
handler
);
if
(
begin
==
end
)
return
{
begin
,
end
};
if
(
begin
==
end
)
return
{
begin
,
begin
};
if
(
*
begin
==
'.'
)
{
if
(
*
begin
==
'.'
)
{
if
(
std
::
is_floating_point
<
Rep
>::
value
)
if
(
std
::
is_floating_point
<
Rep
>::
value
)
begin
=
internal
::
parse_precision
(
begin
,
end
,
handler
);
begin
=
internal
::
parse_precision
(
begin
,
end
,
handler
);
...
...
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