Sanitize index check
[libstick.git] / include / libstick-0.1 / simplicialcomplex.h
index 849bb2284e1185e338405bc60b64a3c85969f998..1695e25abc6fbe611bb7fa9bfc27e12a618c5f03 100644 (file)
@@ -117,7 +117,7 @@ class simplicial_complex {
 
                 /** Get i-th simplex in the simplex order. */
                 const simplex& get_simplex(index_type i) const {
-                    assert(i < size());
+                    assert(0 <= i && i < size());
                     return c.simplices[order.at(i)];
                 }