Bläddra i källkod

use size in order to be compatible with float and double

Sébastien Loriot 1 år sedan
förälder
incheckning
c44e3427aa
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      code/AssetLib/Irr/IRRLoader.cpp

+ 2 - 2
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);
             }