summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mixed_arena.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mixed_arena.h b/src/mixed_arena.h
index 9ae19f94d..b4822680b 100644
--- a/src/mixed_arena.h
+++ b/src/mixed_arena.h
@@ -370,7 +370,7 @@ public:
void insertAt(size_t index, T item) {
assert(index <= usedElements); // appending is ok
resize(usedElements + 1);
- for (auto i = usedElements; i > index; --i) {
+ for (auto i = usedElements - 1; i > index; --i) {
data[i] = data[i - 1];
}
data[index] = item;