From 982bd9778b15cfba5a03971b41226ee5f7c7a1e9 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Mon, 24 Nov 2014 19:14:21 +0100 Subject: [PATCH] Sanitize index check --- include/libstick-0.1/simplicialcomplex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libstick-0.1/simplicialcomplex.h b/include/libstick-0.1/simplicialcomplex.h index 849bb22..1695e25 100644 --- a/include/libstick-0.1/simplicialcomplex.h +++ b/include/libstick-0.1/simplicialcomplex.h @@ -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)]; } -- 2.30.2