Merge branch 'master' of github.com:fmtlib/fmt

This commit is contained in:
Victor Zverovich 2020-11-08 12:45:15 -08:00
commit e528d919a8

View File

@ -474,8 +474,11 @@ OutputIt basic_printf_context<OutputIt, Char>::format() {
const Char* end = parse_ctx_.end(); const Char* end = parse_ctx_.end();
auto it = start; auto it = start;
while (it != end) { while (it != end) {
if (!detail::find<false, Char>(it, end, '%', it)) {
it = end; // detail::find leaves it == nullptr if it doesn't find '%'
break;
}
char_type c = *it++; char_type c = *it++;
if (c != '%') continue;
if (it != end && *it == c) { if (it != end && *it == c) {
out = std::copy(start, it, out); out = std::copy(start, it, out);
start = ++it; start = ++it;