diff options
author | marxin <mliska@suse.cz> | 2019-02-14 20:47:35 +0100 |
---|---|---|
committer | marxin <mliska@suse.cz> | 2019-02-14 20:47:35 +0100 |
commit | 7ae160f6618848648be34ab2c1ac8768cd6c894e (patch) | |
tree | 0b2e4ffe17521d0970dccd0058a5212aab8250e5 | |
parent | 89eb79aef1aac645358664a8245afe35b30da130 (diff) | |
download | redot-engine-7ae160f6618848648be34ab2c1ac8768cd6c894e.tar.gz |
Fix 2 more UBSAN issues (#25217).
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | scene/resources/mesh.cpp | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 873bdd9e7f..b5d59dae99 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -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; diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 805d30245a..a9878ef5c1 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -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? */ { @@ -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(); } |