Skip to content

Commit

Permalink
Merge pull request #84047 from clayjohn/mesh-3x-upgrade-crash
Browse files Browse the repository at this point in the history
Fix crash when upgrading meshes from 3.x format
  • Loading branch information
akien-mga committed Oct 27, 2023
2 parents ac864d6 + 1e3408c commit 5664f09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/resources/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ void _fix_array_compatibility(const Vector<uint8_t> &p_src, uint64_t p_old_forma
uint32_t dst_offsets[Mesh::ARRAY_MAX];
RenderingServer::get_singleton()->mesh_surface_make_offsets_from_format(p_new_format & (~RS::ARRAY_FORMAT_INDEX), p_elements, 0, dst_offsets, dst_vertex_stride, dst_normal_tangent_stride, dst_attribute_stride, dst_skin_stride);

vertex_data.resize(dst_vertex_stride * p_elements);
vertex_data.resize((dst_vertex_stride + dst_normal_tangent_stride) * p_elements);
attribute_data.resize(dst_attribute_stride * p_elements);
skin_data.resize(dst_skin_stride * p_elements);

Expand Down

0 comments on commit 5664f09

Please sign in to comment.