Przeglądaj źródła

Fix buffer overrun in CPUParticles3D

RedworkDE 2 lat temu
rodzic
commit
89980dd9c9
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      scene/3d/cpu_particles_3d.cpp

+ 1 - 1
scene/3d/cpu_particles_3d.cpp

@@ -1207,7 +1207,7 @@ void CPUParticles3D::_update_particle_data_buffer() {
 			ptr[10] = t.basis.rows[2][2];
 			ptr[11] = t.origin.z;
 		} else {
-			memset(ptr, 0, sizeof(Transform3D));
+			memset(ptr, 0, sizeof(float) * 12);
 		}
 
 		Color c = r[idx].color;