From a1eaaaa0e398ce860c0ecfe42d61f98222f57208 Mon Sep 17 00:00:00 2001 From: Krishty Date: Thu, 29 Jul 2021 14:45:39 +0200 Subject: [PATCH 1/2] fix comments fixes some copy-paste errors in logger comments introduced with 89584c167aaf341a6d717083bb9a52a4c1b0ace1 --- include/assimp/Logger.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp index 3ca4a6cb2..18e913953 100644 --- a/include/assimp/Logger.hpp +++ b/include/assimp/Logger.hpp @@ -99,8 +99,8 @@ public: virtual ~Logger(); // ---------------------------------------------------------------------- - /** @brief Writes a info message - * @param message Info message*/ + /** @brief Writes a debug message + * @param message Debug message*/ void debug(const char* message); template @@ -109,7 +109,7 @@ public: } // ---------------------------------------------------------------------- - /** @brief Writes a debug message + /** @brief Writes a debug message * @param message Debug message*/ void verboseDebug(const char* message); @@ -140,7 +140,7 @@ public: // ---------------------------------------------------------------------- /** @brief Writes an error message - * @param message Info message*/ + * @param message Error message*/ void error(const char* message); template From 8d6d6b48c3dad5bb244c0bb7bb6097be4ff083eb Mon Sep 17 00:00:00 2001 From: Hill Ma Date: Mon, 2 Aug 2021 11:58:46 -0700 Subject: [PATCH 2/2] Obj: make a predicate more robust. Since we might encounter invalid input it is a good idea to check the actual size of the array. --- code/AssetLib/Obj/ObjFileImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/Obj/ObjFileImporter.cpp b/code/AssetLib/Obj/ObjFileImporter.cpp index d6232be81..5e2b48e24 100644 --- a/code/AssetLib/Obj/ObjFileImporter.cpp +++ b/code/AssetLib/Obj/ObjFileImporter.cpp @@ -468,7 +468,7 @@ void ObjFileImporter::createVertexArray(const ObjFile::Model *pModel, } // Copy all vertex colors - if (!pModel->m_VertexColors.empty()) { + if (vertex < pModel->m_VertexColors.size()) { const aiVector3D &color = pModel->m_VertexColors[vertex]; pMesh->mColors[0][newIndex] = aiColor4D(color.x, color.y, color.z, 1.0); }