diff options
-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; |