Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

`LocalVector::remove_unordered` should check unsigned index

lawnjelly70717ca9d38e
diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h
index 85d84117962..3f73d320b0a 100644
--- a/core/templates/local_vector.h
+++ b/core/templates/local_vector.h
@@ -99,7 +99,7 @@ public:
/// Removes the item copying the last value into the position of the one to
/// remove. It's generally faster than `remove_at`.
void remove_at_unordered(U p_index) {
- ERR_FAIL_INDEX(p_index, count);
+ ERR_FAIL_UNSIGNED_INDEX(p_index, count);
count--;
if (count > p_index) {
data[p_index] = std::move(data[count]);