Commit 59c3dd80 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Yet another sanity check.

parent c494308b
...@@ -63,6 +63,7 @@ void Vector_delete(Vector* this) { ...@@ -63,6 +63,7 @@ void Vector_delete(Vector* this) {
#ifdef DEBUG #ifdef DEBUG
static inline bool Vector_isConsistent(Vector* this) { static inline bool Vector_isConsistent(Vector* this) {
assert(this->items <= this->arraySize);
if (this->owner) { if (this->owner) {
for (int i = 0; i < this->items; i++) for (int i = 0; i < this->items; i++)
if (this->array[i] && this->array[i]->class != this->vectorType) if (this->array[i] && this->array[i]->class != this->vectorType)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment