From: vortex Date: Wed, 27 Jul 2011 20:30:34 +0000 (+0000) Subject: Fix savegame loading crash X-Git-Tag: xonotic-v0.5.0~66 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c1bd462dad955adecf3d5baf33a993674bb46105;p=xonotic%2Fdarkplaces.git Fix savegame loading crash git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11255 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=ab79f78df3d2083426b0836a85993df69fd483b3 --- 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) {