From ab79f78df3d2083426b0836a85993df69fd483b3 Mon Sep 17 00:00:00 2001 From: vortex Date: Wed, 27 Jul 2011 20:30:34 +0000 Subject: [PATCH] Fix savegame loading crash git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11255 d7cf8633-e32d-0410-b094-e92efae38249 --- zone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone.c b/zone.c index 585c1039..72432d55 100644 --- 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) { -- 2.39.2