fixed header and swap sizes in datafiles (may fixes #14)

This commit is contained in:
Choupom 2010-09-03 21:19:01 +02:00 committed by oy
parent 62fe7cd5b2
commit 3dd1ea0d8f

View file

@ -511,7 +511,7 @@ int CDataFileWriter::Finish()
// calculate the complete size
TypesSize = m_NumItemTypes*sizeof(CDatafileItemType);
HeaderSize = sizeof(CDatafileHeader);
OffsetSize = m_NumItems*sizeof(int) + m_NumDatas*sizeof(int);
OffsetSize = (m_NumItems + m_NumDatas + m_NumDatas) * sizeof(int); //ItemOffsets, DataOffsets, DataSizes
FileSize = HeaderSize + TypesSize + OffsetSize + ItemSize + DataSize;
SwapSize = FileSize - DataSize;