Skip to content

Commit

Permalink
Merge branch 'assimp:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu0617 committed Dec 20, 2022
2 parents 2c87088 + 022c385 commit b406ce6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/assimp/material.inl
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,12 @@ AI_FORCE_INLINE aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
if (prop->mType != aiPTI_Buffer) {
return AI_FAILURE;
}

// std::min has in some cases a conflict with a defined min
#ifdef min
# undef min
#endif
iNum = static_cast<unsigned int>(std::min(static_cast<size_t>(iNum),prop->mDataLength / sizeof(Type)));
::memcpy(pOut,prop->mData,iNum * sizeof(Type));
std::memcpy(pOut,prop->mData,iNum * sizeof(Type));
if (pMax) {
*pMax = iNum;
}
Expand Down

0 comments on commit b406ce6

Please sign in to comment.