diff --git a/components/nif/data.cpp b/components/nif/data.cpp index 8b459d015a..e653959bbc 100644 --- a/components/nif/data.cpp +++ b/components/nif/data.cpp @@ -413,7 +413,7 @@ namespace Nif if (!hasPresenceFlags || nif->get()) nif->readVector(mVertexMap, numVertices); if (!hasPresenceFlags || nif->get()) - nif->readVector(mWeights, numVertices * bonesPerVertex); + nif->readVector(mWeights, static_cast(numVertices) * bonesPerVertex); std::vector stripLengths; nif->readVector(stripLengths, numStrips); if (!hasPresenceFlags || nif->get()) @@ -428,7 +428,7 @@ namespace Nif nif->readVector(mTriangles, numTriangles * 3); } if (nif->get() != 0) - nif->readVector(mBoneIndices, numVertices * bonesPerVertex); + nif->readVector(mBoneIndices, static_cast(numVertices) * bonesPerVertex); if (nif->getBethVersion() > NIFFile::BethVersion::BETHVER_FO3) { nif->read(mLODLevel);