diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_3d/soft_body_3d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/rendering_server.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_3d/soft_body_3d_sw.cpp b/servers/physics_3d/soft_body_3d_sw.cpp index 5e8f8692ba..7d173f9294 100644 --- a/servers/physics_3d/soft_body_3d_sw.cpp +++ b/servers/physics_3d/soft_body_3d_sw.cpp @@ -567,7 +567,7 @@ bool SoftBody3DSW::create_from_trimesh(const Vector<int> &p_indices, const Vecto for (uint32_t i = 0; i < pinned_count; ++i) { int pinned_vertex = pinned_vertices[i]; - ERR_CONTINUE(pinned_vertex >= visual_vertex_count); + ERR_CONTINUE(pinned_vertex < 0 || pinned_vertex >= visual_vertex_count); uint32_t node_index = map_visual_to_physics[pinned_vertex]; ERR_CONTINUE(node_index >= node_count); diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 58e99f0e91..847f29f6ba 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -934,7 +934,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa } } - ERR_FAIL_COND_V((bsformat) != (format & (RS::ARRAY_FORMAT_INDEX - 1)), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V_MSG((bsformat) != (format & (ARRAY_FORMAT_VERTEX | ARRAY_FORMAT_NORMAL | ARRAY_FORMAT_TANGENT)), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays."); } } |