From: Enlightenment S. <no-...@en...> - 2008-10-31 18:08:00
|
Log: Prevent random jump in memory. Author: cedric Date: 2008-10-31 11:07:57 -0700 (Fri, 31 Oct 2008) New Revision: 37360 Modified: trunk/PROTO/e_phys/src/lib/e_phys_constraint.c Modified: trunk/PROTO/e_phys/src/lib/e_phys_constraint.c =================================================================== --- trunk/PROTO/e_phys/src/lib/e_phys_constraint.c 2008-10-31 17:42:47 UTC (rev 37359) +++ trunk/PROTO/e_phys/src/lib/e_phys_constraint.c 2008-10-31 18:07:57 UTC (rev 37360) @@ -38,7 +38,7 @@ E_Phys_Constraint_Boundary * e_phys_constraint_boundary_add(E_Phys_World *world) { - E_Phys_Constraint_Boundary *con = malloc(sizeof(E_Phys_Constraint_Boundary)); + E_Phys_Constraint_Boundary *con = calloc(1, sizeof(E_Phys_Constraint_Boundary)); e_phys_constraint_init(E_PHYS_CONSTRAINT(con), world, e_phys_constraint_boundary_apply, NULL); |