diff options
author | rubidium <rubidium@openttd.org> | 2009-04-23 23:47:13 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-23 23:47:13 +0000 |
commit | 7d76836fcb2e1a03b6b84592da55d5157245a9a1 (patch) | |
tree | 30a62bb40b4503a40cc852d65c8d7e290b5968a4 | |
parent | 81dccf32c17dc557e0c021de31dc4a3872da07dc (diff) | |
download | openttd-7d76836fcb2e1a03b6b84592da55d5157245a9a1.tar.xz |
(svn r16132) -Fix (r7232/r16129): crash when saving games; r7232 is the cause of the problem, r16129 just causes it to be triggered.
-rw-r--r-- | src/settings.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index a37eadf65..2cce2d35c 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1650,8 +1650,7 @@ static void SaveSettings(const SettingDesc *sd, void *object) const SettingDesc *i; size_t length = 0; for (i = sd; i->save.cmd != SL_END; i++) { - const void *ptr = GetVariableAddress(object, &i->save); - length += SlCalcObjMemberLength(ptr, &i->save); + length += SlCalcObjMemberLength(object, &i->save); } SlSetLength(length); |