(svn r7232) -Codechange: Also allow for the save/load of non pre-allocated strings inside structs.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user