(svn r7232) -Codechange: Also allow for the save/load of non pre-allocated strings inside structs.

This commit is contained in:
Darkvater
2006-11-21 20:23:57 +00:00
parent 2a91c8d723
commit df54f52e20
3 changed files with 30 additions and 17 deletions

View File

@@ -1717,7 +1717,8 @@ static void SaveSettings(const SettingDesc *sd, void *object)
const SettingDesc *i;
size_t length = 0;
for (i = sd; i->save.cmd != SL_END; i++) {
length += SlCalcObjMemberLength(&i->save);
const void *ptr = GetVariableAddress(object, &i->save);
length += SlCalcObjMemberLength(ptr, &i->save);
}
SlSetLength(length);