]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix savegame loading crash
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Jul 2011 20:30:34 +0000 (20:30 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Sun, 31 Jul 2011 18:54:45 +0000 (20:54 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11255 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ab79f78df3d2083426b0836a85993df69fd483b3

zone.c

diff --git a/zone.c b/zone.c
index 585c10396d03db32e726ccaef168d1eb32b52043..72432d551a9ef485df3eae579130225548f657ce 100644 (file)
--- a/zone.c
+++ b/zone.c
@@ -634,7 +634,7 @@ void Mem_ExpandableArray_FreeArray(memexpandablearray_t *l)
 void *Mem_ExpandableArray_AllocRecordAtIndex(memexpandablearray_t *l, size_t index)
 {
        size_t j;
-       if (index == l->numarrays)
+       if (index >= l->numarrays)
        {
                if (l->numarrays == l->maxarrays)
                {