cloth: Fix overallocation for collisions

This was introduced when eltopo was added, but not reverted when it was
removed.
This commit is contained in:
Sergej Reich 2014-11-11 18:05:00 +01:00
parent e43c5fa005
commit 9c15439c5c
1 changed files with 1 additions and 1 deletions

View File

@ -648,7 +648,7 @@ static void cloth_bvh_objcollisions_nearcheck ( ClothModifierData * clmd, Collis
{
int i;
*collisions = (CollPair *) MEM_mallocN(sizeof(CollPair) * numresult * 64, "collision array" ); // * 4 since cloth_collision_static can return more than 1 collision
*collisions = (CollPair *) MEM_mallocN(sizeof(CollPair) * numresult * 4, "collision array" ); // * 4 since cloth_collision_static can return more than 1 collision
*collisions_index = *collisions;
for ( i = 0; i < numresult; i++ ) {