Merge pull request #813 from xenrox/fmt-fix

Fix crash with fmt
This commit is contained in:
Alex 2020-08-10 20:57:00 +02:00 committed by GitHub
commit 3bb04e82a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ namespace fmt {
constexpr auto parse(ParseContext& ctx) -> decltype (ctx.begin()) {
auto it = ctx.begin(), end = ctx.end();
if (it != end && *it == ':') ++it;
if (*it == '>' || *it == '<' || *it == '=') {
if (it && (*it == '>' || *it == '<' || *it == '=')) {
spec = *it;
++it;
}