Merge pull request #52121 from groud/fix_localvector_insert

Fix LocalVector crash on insert.
This commit is contained in:
Juan Linietsky 2021-08-26 13:31:35 -03:00 committed by GitHub
commit 22cae39c1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;