diff --git a/include/fmt/format.h b/include/fmt/format.h index 6336599292d8..0da5607aef6e 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -4148,8 +4148,7 @@ void vformat_to(buffer& buf, basic_string_view fmt, -> const Char* { auto arg = get_arg(context, id); if (arg.type() == type::custom_type) { - parse_context.advance_to(parse_context.begin() + - (begin - &*parse_context.begin())); + parse_context.advance_to(begin); visit_format_arg(custom_formatter{parse_context, context}, arg); return parse_context.begin(); }