Skip to content

Commit

Permalink
use size in order to be compatible with float and double
Browse files Browse the repository at this point in the history
  • Loading branch information
sloriot authored and kimkulling committed Oct 24, 2023
1 parent 1169d3b commit c44e342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/AssetLib/Irr/IRRLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c44e342

Please sign in to comment.