fixed ref num saving in non-wide format

This commit is contained in:
Marc Zinnschlag 2015-01-22 13:41:09 +01:00
parent 764c155cec
commit a97f599e65
4 changed files with 41 additions and 8 deletions

View file

@ -17,7 +17,11 @@ void ESM::RefNum::save (ESMWriter &esm, bool wide) const
if (wide)
esm.writeHNT ("FRMR", *this, 8);
else
esm.writeHNT ("FRMR", mIndex, 4);
{
int refNum = (mIndex & 0xffffff) | ((mContentFile==-1 ? 0xff : mContentFile)<<24);
esm.writeHNT ("FRMR", refNum, 4);
}
}