summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-23 23:47:13 +0000
committerrubidium <rubidium@openttd.org>2009-04-23 23:47:13 +0000
commit7d76836fcb2e1a03b6b84592da55d5157245a9a1 (patch)
tree30a62bb40b4503a40cc852d65c8d7e290b5968a4 /src
parent81dccf32c17dc557e0c021de31dc4a3872da07dc (diff)
downloadopenttd-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.
Diffstat (limited to 'src')
-rw-r--r--src/settings.cpp3
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);