From 04216ee1a0b48f44a3d91f3b5814fc2f7da239a5 Mon Sep 17 00:00:00 2001 From: gered Date: Thu, 24 Jun 2010 19:51:33 -0400 Subject: [PATCH] fixed incorrect chunk size calculation --- MeshConverter/src/sm/sm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MeshConverter/src/sm/sm.cpp b/MeshConverter/src/sm/sm.cpp index 986fb45..5b0a88a 100644 --- a/MeshConverter/src/sm/sm.cpp +++ b/MeshConverter/src/sm/sm.cpp @@ -268,7 +268,7 @@ bool StaticModel::ConvertToMesh(const std::string &file) for (int i = 0; i < numMaterials; ++i) sizeofNames += m_materials[i].material->GetTexture().length() + 1; - long sizeofMaterials = numMaterials + sizeof(long); + long sizeofMaterials = sizeofNames + sizeof(long); fwrite(&sizeofMaterials, sizeof(long), 1, fp); fwrite(&numMaterials, sizeof(long), 1, fp); for (long i = 0; i < numMaterials; ++i)