changeset 9524:8f44f4e81560 draft

(svn r13520) -Fix (r13375): pointer has to be valid before it can be loaded to (SLE_STR)
author smatz <smatz@openttd.org>
date Sun, 15 Jun 2008 13:52:51 +0000
parents 449682bc8398
children 939a335c63b9
files src/gamelog.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gamelog.cpp
+++ b/src/gamelog.cpp
@@ -754,6 +754,8 @@
 			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);