From 31ce6bc70274014dd161d512678697741f46411b Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Fri, 3 Jul 2020 08:53:42 -0400 Subject: [PATCH] Fix a conversion warning with Clang10 on Windows (#1750) Fixes #1747 --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 7bd6543c3f78..751e19ad1707 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -566,7 +566,7 @@ template void buffer::append(const U* begin, const U* end) { size_t new_size = size_ + to_unsigned(end - begin); reserve(new_size); - std::uninitialized_copy(begin, end, make_checked(ptr_, capacity_) + size_); + std::uninitialized_copy(begin, end, make_checked(ptr_ + size_, capacity_ - size_)); size_ = new_size; } } // namespace detail