From c44e3427aa58fd77cefd3b2b847b279085dc9fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 10 Oct 2023 12:44:34 -0700 Subject: [PATCH] use size in order to be compatible with float and double --- code/AssetLib/Irr/IRRLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/Irr/IRRLoader.cpp b/code/AssetLib/Irr/IRRLoader.cpp index ba6ebc964..f841cd876 100644 --- a/code/AssetLib/Irr/IRRLoader.cpp +++ b/code/AssetLib/Irr/IRRLoader.cpp @@ -575,8 +575,8 @@ void SetupMapping(aiMaterial *mat, aiTextureMapping mode, const aiVector3D &axis m->mSemantic = prop->mSemantic; m->mType = aiPTI_Float; - m->mDataLength = 12; - m->mData = new char[12]; + m->mDataLength = sizeof(aiVector3D); + m->mData = new char[m->mDataLength]; *((aiVector3D *)m->mData) = axis; p.push_back(m); }