mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-19 20:18:49 +00:00
Fix a UB in parse_format_specs when begin is null
This commit is contained in:
parent
51b14b6c0c
commit
659de779e6
@ -2487,7 +2487,7 @@ FMT_CONSTEXPR FMT_INLINE auto parse_format_specs(const Char* begin,
|
||||
const Char* end,
|
||||
SpecHandler&& handler)
|
||||
-> const Char* {
|
||||
if (begin + 1 < end && begin[1] == '}' && is_ascii_letter(*begin) &&
|
||||
if (1 < end - begin && begin[1] == '}' && is_ascii_letter(*begin) &&
|
||||
*begin != 'L') {
|
||||
presentation_type type = parse_presentation_type(*begin++);
|
||||
if (type == presentation_type::none)
|
||||
|
Loading…
Reference in New Issue
Block a user