1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Merge remote-tracking branch 'lgro/issue1042_TES3_header_data_wrong_encoding'

This commit is contained in:
Marc Zinnschlag 2013-12-28 17:14:41 +01:00
commit f1be4656ec

View File

@ -19,7 +19,15 @@ void ESM::Header::blank()
void ESM::Header::load (ESMReader &esm)
{
esm.getHNT (mData, "HEDR", 300);
if (esm.isNextSub("HEDR"))
{
esm.getSubHeader();
esm.getT(mData.version);
esm.getT(mData.type);
mData.author.assign(esm.getString(sizeof(mData.author.name)));
mData.desc.assign(esm.getString(sizeof(mData.desc.name)));
esm.getT(mData.records);
}
if (esm.isNextSub ("FORM"))
{
@ -52,4 +60,4 @@ void ESM::Header::save (ESMWriter &esm)
esm.writeHNCString ("MAST", iter->name);
esm.writeHNT ("DATA", iter->size);
}
}
}