From 9fb587b702b42086c0ab21d27014b1f7b543002a Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Fri, 31 Jul 2020 13:49:15 +0200 Subject: [PATCH] Fixes issue with LocalVector remove function --- core/local_vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/local_vector.h b/core/local_vector.h index d97f3330dc7..b0dbd22b295 100644 --- a/core/local_vector.h +++ b/core/local_vector.h @@ -73,10 +73,10 @@ public: void remove(U p_index) { ERR_FAIL_UNSIGNED_INDEX(p_index, count); + count--; for (U i = p_index; i < count; i++) { data[i] = data[i + 1]; } - count--; if (!__has_trivial_destructor(T) && !force_trivial) { data[count].~T(); }