Sanitize index check
authorStefan Huber <shuber@sthu.org>
Mon, 24 Nov 2014 18:14:21 +0000 (19:14 +0100)
committerStefan Huber <shuber@sthu.org>
Mon, 24 Nov 2014 18:17:47 +0000 (19:17 +0100)
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)];
                 }