Fix for issue #3241

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
This commit is contained in:
Vladislav Shchapov
2022-12-23 12:26:20 -08:00
committed by Victor Zverovich
parent bde1a6070d
commit e004f1d699
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -863,7 +863,7 @@ template <typename Char, typename T, typename U,
FMT_CONSTEXPR auto copy_str(T* begin, T* end, U* out) -> U* {
if (is_constant_evaluated()) return copy_str<Char, T*, U*>(begin, end, out);
auto size = to_unsigned(end - begin);
memcpy(out, begin, size * sizeof(U));
if (size > 0) memcpy(out, begin, size * sizeof(U));
return out + size;
}