Skip to content

Commit

Permalink
Fix 2 more UBSAN issues (godotengine#25217).
Browse files Browse the repository at this point in the history
  • Loading branch information
marxin committed Feb 14, 2019
1 parent 89eb79a commit 7ae160f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4559,6 +4559,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_grid = true;
snap_guides = true;
snap_rotation = false;
snap_relative = false;
snap_pixel = false;

skeleton_show_bones = true;
Expand Down
6 changes: 3 additions & 3 deletions scene/resources/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
Surface s;

VisualServer::get_singleton()->mesh_add_surface_from_arrays(mesh, (VisualServer::PrimitiveType)p_primitive, p_arrays, p_blend_shapes, p_flags);
surfaces.push_back(s);

/* make aABB? */ {

Expand All @@ -808,8 +807,9 @@ void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &
aabb.expand_to(vtx[i]);
}

surfaces.write[surfaces.size() - 1].aabb = aabb;
surfaces.write[surfaces.size() - 1].is_2d = arr.get_type() == Variant::POOL_VECTOR2_ARRAY;
s.aabb = aabb;
s.is_2d = arr.get_type() == Variant::POOL_VECTOR2_ARRAY;
surfaces.push_back(s);

_recompute_aabb();
}
Expand Down

0 comments on commit 7ae160f

Please sign in to comment.