diff --git a/src/String/StringView.hpp b/src/String/StringView.hpp index ca31270..486dbde 100644 --- a/src/String/StringView.hpp +++ b/src/String/StringView.hpp @@ -25,8 +25,7 @@ namespace ArbUt { public: __ConstStringCharHolder(const std::string_view& value) noexcept : _value(new char[value.length() + 1]), _references(1) { - strncpy(_value, value.data(), value.length()); - _value[value.length()] = '\0'; + strncpy(_value, value.data(), value.length() + 1); } ~__ConstStringCharHolder() { delete[] _value; }