diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-03 22:32:07 +0100 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-02-03 22:32:07 +0100 |
commit | d7c843c23bf73655df201e95fffef36c7e57c298 (patch) | |
tree | d23217b5f5cbd0c76601ea68a56dc1de7af98b4a /Vector.c | |
parent | 14bd77c5f4ac968e9d6f0a5a9be29d49c5588f6d (diff) |
Complete cursor-based movement of headers.
Diffstat (limited to 'Vector.c')
-rw-r--r-- | Vector.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -192,6 +192,10 @@ void Vector_insert(Vector* this, int idx, void* data_) { assert(idx <= this->items); assert(Object_isA(data, this->type)); assert(Vector_isConsistent(this)); + + if (idx > this->items) { + idx = this->items; + } Vector_checkArraySize(this); //assert(this->array[this->items] == NULL); |