From 91f2738ec902bba6026e442726e2ffbeb46a0ee8 Mon Sep 17 00:00:00 2001 From: fed <58637860+fedddddd@users.noreply.github.com> Date: Tue, 19 Dec 2023 16:15:20 +0100 Subject: [PATCH] Some fixes --- src/client/component/materials.cpp | 1 + src/common/utils/string.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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)