[Bf-blender-cvs] [a28fd0ceb59] master: Correct over allocation in "Fix Vertex Group Deform" operator
Campbell Barton
noreply at git.blender.org
Tue Apr 26 06:33:34 CEST 2022
Commit: a28fd0ceb59420db1ad62bad08f526f1791db2ab
Author: Campbell Barton
Date: Tue Apr 26 14:29:03 2022 +1000
Branches: master
https://developer.blender.org/rBa28fd0ceb59420db1ad62bad08f526f1791db2ab
Correct over allocation in "Fix Vertex Group Deform" operator
The pointer size was incorrectly being used instead of the float size.
===================================================================
M source/blender/editors/object/object_vgroup.c
===================================================================
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 1ad722d4fdc..492ece0b40e 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1340,7 +1340,7 @@ static void moveCloserToDistanceFromPlane(Depsgraph *depsgraph,
float oldPos[3] = {0};
float vc, hc, dist = 0.0f;
int i, k;
- float(*changes)[2] = MEM_mallocN(sizeof(float *) * totweight * 2, "vertHorzChange");
+ float(*changes)[2] = MEM_mallocN(sizeof(float[2]) * totweight, "vertHorzChange");
float *dists = MEM_mallocN(sizeof(float) * totweight, "distance");
/* track if up or down moved it closer for each bone */
More information about the Bf-blender-cvs
mailing list