(svn r13520) -Fix (r13375): pointer has to be valid before it can be loaded to (SLE_STR)
authorsmatz
Sun, 15 Jun 2008 13:52:51 +0000
changeset 10966 3de9939c8a91
parent 10965 a2b5f6f9be0c
child 10967 fb9a80b89ea4
(svn r13520) -Fix (r13375): pointer has to be valid before it can be loaded to (SLE_STR)
src/gamelog.cpp
--- a/src/gamelog.cpp	Sun Jun 15 02:48:25 2008 +0000
+++ b/src/gamelog.cpp	Sun Jun 15 13:52:51 2008 +0000
@@ -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);