Step-Importer: introduce new files.

This commit is contained in:
Kim Kulling
2018-08-26 19:05:21 +02:00
parent 8ceca4daaf
commit c75bc99902
5 changed files with 78 additions and 8 deletions

View File

@@ -119,9 +119,9 @@ bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const {
}
}
aiTexel* imageContent = new aiTexel[1u + imageSize / sizeof(aiTexel)];
file.seekg(0, std::ios::beg);
file.read(reinterpret_cast<char*>(imageContent), imageSize);
aiTexel* imageContent = new aiTexel[1u + static_cast<size_t>( imageSize) / sizeof(aiTexel)];
file.seekg( 0, std::ios::beg );
file.read( reinterpret_cast<char*>(imageContent), imageSize );
// Enlarging the textures table
auto textureId = pScene->mNumTextures++;