From: Stefan Huber Date: Mon, 24 Nov 2014 18:14:21 +0000 (+0100) Subject: Sanitize index check X-Git-Tag: v0.1~2 X-Git-Url: https://git.sthu.org/?p=libstick.git;a=commitdiff_plain;h=982bd9778b15cfba5a03971b41226ee5f7c7a1e9 Sanitize index check --- 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)]; }