From 09a81e0d6870e15de834abba3a18f65fd81535f7 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 2 Nov 2022 19:31:54 +0100 Subject: [PATCH] assimp: Fix memory corruption in load_texture_stage() --- pandatool/src/assimp/assimpLoader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandatool/src/assimp/assimpLoader.cxx b/pandatool/src/assimp/assimpLoader.cxx index 8547bb7c56..316781d50b 100644 --- a/pandatool/src/assimp/assimpLoader.cxx +++ b/pandatool/src/assimp/assimpLoader.cxx @@ -291,10 +291,10 @@ load_texture_stage(const aiMaterial &mat, const aiTextureType &ttype, CPT(Textur unsigned int uvindex; float blend; aiTextureOp op; - aiTextureMapMode mapmode; + aiTextureMapMode mapmode[3]; for (size_t i = 0; i < mat.GetTextureCount(ttype); ++i) { - mat.GetTexture(ttype, i, &path, &mapping, nullptr, &blend, &op, &mapmode); + mat.GetTexture(ttype, i, &path, &mapping, nullptr, &blend, &op, mapmode); if (AI_SUCCESS != mat.Get(AI_MATKEY_UVWSRC(ttype, i), uvindex)) { // If there's no texture coordinate set for this texture, assume that