From ed08a4bd58751a81a8289a1e4a43f7dea460098f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 28 Nov 2022 22:59:26 +0100 Subject: [PATCH] lib/fmt/ToBuffer: use iterator instead of pointer --- src/lib/fmt/ToBuffer.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/fmt/ToBuffer.hxx b/src/lib/fmt/ToBuffer.hxx index f1dba0beb..8a2a6db42 100644 --- a/src/lib/fmt/ToBuffer.hxx +++ b/src/lib/fmt/ToBuffer.hxx @@ -42,7 +42,7 @@ auto VFmtBuffer(fmt::string_view format_str, fmt::format_args args) noexcept { StringBuffer buffer; - auto [p, _] = fmt::vformat_to_n(buffer.data(), buffer.capacity() - 1, + auto [p, _] = fmt::vformat_to_n(buffer.begin(), buffer.capacity() - 1, format_str, args); *p = 0; return buffer;