Fixed sizeof bug when reading old model header

This commit is contained in:
Xiao Qi 2022-11-19 21:27:30 +08:00
parent c4be9b1cba
commit 6fa14aff85
1 changed files with 3 additions and 2 deletions

View File

@ -58,9 +58,10 @@ namespace SHADE
file.seekg(0);
//TODO Update to new mesh header with anim count when animation saving is done
file.read(
reinterpret_cast<char*>(&model.header),
sizeof(SHModelAssetHeader)
reinterpret_cast<char*>(&model.header.meshCount),
sizeof(model.header.meshCount)
);
std::vector<SHMeshLoaderHeader> headers(model.header.meshCount);