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;