From de71db6d4211f966f1006a4004d9aa80513cd76b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 12 Dec 2018 11:27:06 -0800 Subject: [PATCH] Fix asan error (#977) --- include/fmt/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 3f4fe90f5540..907b3e38d807 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1952,8 +1952,8 @@ FMT_CONSTEXPR const Char *parse_arg_id( return handler.on_error("invalid format string"), begin; auto it = begin; do { - c = *++it; - } while (it != end && (is_name_start(c) || ('0' <= c && c <= '9'))); + ++it; + } while (it != end && (is_name_start(c = *it) || ('0' <= c && c <= '9'))); handler(basic_string_view(begin, to_unsigned(it - begin))); return it; }