projects
/
libstick.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sanitize index check
[libstick.git]
/
include
/
libstick-0.1
/
simplicialcomplex.h
diff --git
a/include/libstick-0.1/simplicialcomplex.h
b/include/libstick-0.1/simplicialcomplex.h
index 849bb2284e1185e338405bc60b64a3c85969f998..1695e25abc6fbe611bb7fa9bfc27e12a618c5f03 100644
(file)
--- 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 {
/** 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)];
}
return c.simplices[order.at(i)];
}