summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-15 13:52:51 +0000
committersmatz <smatz@openttd.org>2008-06-15 13:52:51 +0000
commit704c9be0b8eb7e62d6f52cf772a14c5e17540aae (patch)
tree946ab2d864cadba267da46519a2257e901b52871
parent237a6f554a54284292a393a9f972b57b813aebdc (diff)
downloadopenttd-704c9be0b8eb7e62d6f52cf772a14c5e17540aae.tar.xz
(svn r13520) -Fix (r13375): pointer has to be valid before it can be loaded to (SLE_STR)
-rw-r--r--src/gamelog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gamelog.cpp b/src/gamelog.cpp
index aba915ea4..11b651851 100644
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -754,6 +754,8 @@ static void Load_GLOG()
la->change = ReallocT(la->change, la->changes + 1);
LoggedChange *lc = &la->change[la->changes++];
+ /* for SLE_STR, pointer has to be valid! so make it NULL */
+ memset(lc, 0, sizeof(*lc));
lc->ct = ct;
assert((uint)ct < GLCT_END);