mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix unchecked array access in build_*_planes
(cherry picked from commit f054f760e6)
This commit is contained in:
committed by
Rémi Verschelde
parent
6f4f49c1d5
commit
4f891b7060
@@ -877,6 +877,7 @@ PoolVector<Plane> Geometry::build_box_planes(const Vector3 &p_extents) {
|
||||
}
|
||||
|
||||
PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_height, int p_sides, Vector3::Axis p_axis) {
|
||||
ERR_FAIL_INDEX_V(p_axis, 3, PoolVector<Plane>());
|
||||
|
||||
PoolVector<Plane> planes;
|
||||
|
||||
@@ -899,6 +900,7 @@ PoolVector<Plane> Geometry::build_cylinder_planes(real_t p_radius, real_t p_heig
|
||||
}
|
||||
|
||||
PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis) {
|
||||
ERR_FAIL_INDEX_V(p_axis, 3, PoolVector<Plane>());
|
||||
|
||||
PoolVector<Plane> planes;
|
||||
|
||||
@@ -932,6 +934,7 @@ PoolVector<Plane> Geometry::build_sphere_planes(real_t p_radius, int p_lats, int
|
||||
}
|
||||
|
||||
PoolVector<Plane> Geometry::build_capsule_planes(real_t p_radius, real_t p_height, int p_sides, int p_lats, Vector3::Axis p_axis) {
|
||||
ERR_FAIL_INDEX_V(p_axis, 3, PoolVector<Plane>());
|
||||
|
||||
PoolVector<Plane> planes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user