mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-02 04:13:26 +00:00
(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:
parent
81dccf32c1
commit
7d76836fcb
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user