diff --git a/src/client/component/materials.cpp b/src/client/component/materials.cpp index 60590679..ee8cce39 100644 --- a/src/client/component/materials.cpp +++ b/src/client/component/materials.cpp @@ -167,6 +167,7 @@ namespace materials image->textures.map = nullptr; image->textures.shaderView = nullptr; image->textures.shaderViewAlternate = nullptr; + texture_table->u.image = image; material->textureTable = texture_table; diff --git a/src/common/utils/string.cpp b/src/common/utils/string.cpp index b28dab70..7da02312 100644 --- a/src/common/utils/string.cpp +++ b/src/common/utils/string.cpp @@ -134,9 +134,9 @@ namespace utils::string std::string strip(const std::string& string) { std::string new_string; - new_string.resize(string.size(), 0); + new_string.resize(string.size() + 1, 0); strip(string.data(), new_string.data(), static_cast(new_string.size())); - return new_string; + return new_string.data(); } std::string convert(const std::wstring& wstr)