From b0cb253a515e5576119d78b6439adeaf2d4b0514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Thu, 26 Aug 2021 11:54:56 +0200 Subject: [PATCH] Fix LocalVector crash on insert. (cherry picked from commit de0765b94a9e62a0b9a5f35dbf262c14b1655815) --- 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 f42456ac059..8a571c8a346 100644 --- a/core/local_vector.h +++ b/core/local_vector.h @@ -169,7 +169,7 @@ public: push_back(p_val); } else { resize(count + 1); - for (U i = count; i > p_pos; i--) { + for (U i = count - 1; i > p_pos; i--) { data[i] = data[i - 1]; } data[p_pos] = p_val;