From cdbbe006075d69dbb7b32c077333b5fa6a13b9d7 Mon Sep 17 00:00:00 2001 From: Florin Iucha Date: Thu, 2 Jul 2020 10:51:30 -0400 Subject: [PATCH] Fix a conversion warning with Clang10 on Windows 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