diff options
author | Gilles Roudière <gilles.roudiere@gmail.com> | 2021-08-26 11:54:56 +0200 |
---|---|---|
committer | Gilles Roudière <gilles.roudiere@gmail.com> | 2021-08-26 11:54:56 +0200 |
commit | de0765b94a9e62a0b9a5f35dbf262c14b1655815 (patch) | |
tree | 7723663d2a9d4cf19f2994370f9607bdda20c2ef /core | |
parent | 6e87d628735cb201cb3de49a723baaf60d9c942d (diff) |
Fix LocalVector crash on insert.
Diffstat (limited to 'core')
-rw-r--r-- | core/templates/local_vector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h index 668ec513d6..5704b8f230 100644 --- a/core/templates/local_vector.h +++ b/core/templates/local_vector.h @@ -170,7 +170,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; |