diff --git a/include/fmt/core.h b/include/fmt/core.h index 5ce1cb47..ffc2ff3d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -2282,7 +2282,7 @@ FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end, FMT_ASSERT(begin != end, ""); auto align = align::none; auto p = begin + code_point_length(begin); - if (p >= end) p = begin; + if (end - p <= 0) p = begin; for (;;) { switch (to_ascii(*p)) { case '<':