The tables have nothing to do with corrupted data though.
Have a look at some specs for the c language aggregate initialization rules:
https://msdn.microsoft.com/en-us/library/81k8cwsz.aspx
The scriptdefense array at the end will be zero initialized.
I was lookin at comments like this, and I wasn't sure if that dat table needed me to reserve the space; as this is the case for many entries, even with zero'd fields.
Code:
bool reset_guys()
{
// The .dat file's guys definitions are always synchronised with defdata.cpp's - even the tile settings.
init_guys(V_GUYS);
return true;
}
Things like this tend to make me consider that proper synchronisation is mandatory at all times, and that the fields are explicitly prepared.
[edit] Also, I have to ask it, (sorry if it seems obvious to you, just trying to help) not trying to sound like a ass or anything: Without properly reading the version correctly you'll never be able to read/write a quest file without it becoming corrupted. This is because without it you introduce a "chicken and egg" logic bug regardless. The only way around this is to compile two versions, one for saving and one for loading.