Browse Source

fix out of bounds crash in GPUParticle3D::_skinning_changed()

LATRio 3 years ago
parent
commit
1b55d72c68
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/3d/gpu_particles_3d.cpp

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

@@ -469,7 +469,7 @@ void GPUParticles3D::_skinning_changed() {
 			if (draw_pass.is_valid() && draw_pass->get_builtin_bind_pose_count() > 0) {
 			if (draw_pass.is_valid() && draw_pass->get_builtin_bind_pose_count() > 0) {
 				xforms.resize(draw_pass->get_builtin_bind_pose_count());
 				xforms.resize(draw_pass->get_builtin_bind_pose_count());
 				for (int j = 0; j < draw_pass->get_builtin_bind_pose_count(); j++) {
 				for (int j = 0; j < draw_pass->get_builtin_bind_pose_count(); j++) {
-					xforms.write[i] = draw_pass->get_builtin_bind_pose(j);
+					xforms.write[j] = draw_pass->get_builtin_bind_pose(j);
 				}
 				}
 				break;
 				break;
 			}
 			}