Expandable arrays: memset to zero newly returned records (to be consistent with Mem_A...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Jan 2008 21:43:55 +0000 (21:43 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 24 Jan 2008 21:43:55 +0000 (21:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8005 d7cf8633-e32d-0410-b094-e92efae38249

zone.c

diff --git a/zone.c b/zone.c
index 2ab390b..175b25a 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -431,6 +431,7 @@ void *Mem_ExpandableArray_AllocRecord(memexpandablearray_t *l)
                                {
                                        l->arrays[i].allocflags[j] = true;
                                        l->arrays[i].numflaggedrecords++;
+                                       memset(l->arrays[i].data + l->recordsize * j, 0, l->recordsize);
                                        return (void *)(l->arrays[i].data + l->recordsize * j);
                                }
                        }