Explorar el Código

structure/Vector: Check index in _Get against capacity, not count.

Ambroz Bizjak hace 11 años
padre
commit
c8df8836d3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      structure/Vector_impl.h

+ 1 - 1
structure/Vector_impl.h

@@ -51,7 +51,7 @@ static void Vector_Free (Vector *o)
 
 static VectorElem * Vector_Get (Vector *o, size_t index)
 {
-    ASSERT(index < o->count)
+    ASSERT(index < o->capacity)
     
     return &o->elems[index];
 }