(svn r16132) -Fix (r7232/r16129): crash when saving games; r7232 is the cause of the problem, r16129 just causes it to be triggered.
This commit is contained in:
@@ -1650,8 +1650,7 @@ static void SaveSettings(const SettingDesc *sd, void *object)
|
|||||||
const SettingDesc *i;
|
const SettingDesc *i;
|
||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
for (i = sd; i->save.cmd != SL_END; i++) {
|
for (i = sd; i->save.cmd != SL_END; i++) {
|
||||||
const void *ptr = GetVariableAddress(object, &i->save);
|
length += SlCalcObjMemberLength(object, &i->save);
|
||||||
length += SlCalcObjMemberLength(ptr, &i->save);
|
|
||||||
}
|
}
|
||||||
SlSetLength(length);
|
SlSetLength(length);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user