diff options
author | Ben Millwood <thebenmachine@gmail.com> | 2009-10-03 12:52:48 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:18 +0000 |
commit | f5dd6915ff7192a3b644e15cdff40756c976618b (patch) | |
tree | 46d1ab3f4a6ebcd67d311f1cda99b497b30075b8 /src/game | |
parent | 5a39a8c9ca0434cfb17f33a7ff4aef1c00585a48 (diff) |
Initialisation fix in BP zone allocation code
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/g_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index 7b1ff789..b3f65228 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2423,10 +2423,9 @@ void CheckCvars( void ) size_t newsize = g_humanRepeaterMaxZones.integer * sizeof( zone_t ); size_t oldsize = lastNumZones * sizeof( zone_t ); newZones = BG_Alloc( newsize ); - Com_Memset( &newZones[ lastNumZones ], 0, newsize - oldsize ); if( level.powerZones ) { - Com_Memcpy( newZones, level.powerZones, oldsize ); + Com_Memcpy( newZones, level.powerZones, MIN( oldsize, newsize ) ); BG_Free( level.powerZones ); } level.powerZones = newZones; |