summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Witness_complex/include/gudhi/Strong_witness_complex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Witness_complex/include/gudhi/Strong_witness_complex.h b/src/Witness_complex/include/gudhi/Strong_witness_complex.h
index f58dff40..d7d0b2f0 100644
--- a/src/Witness_complex/include/gudhi/Strong_witness_complex.h
+++ b/src/Witness_complex/include/gudhi/Strong_witness_complex.h
@@ -118,7 +118,7 @@ private:
typeVectorVertex simplex;
typename ActiveWitness::iterator aw_it = aw.begin();
float lim_dist2 = aw.begin()->second + max_alpha_square;
- while ((Landmark_id)simplex.size() < limit_dimension + 1 && aw_it != aw.end() && aw_it->second < lim_dist2) {
+ while ((Landmark_id)simplex.size() <= limit_dimension && aw_it != aw.end() && aw_it->second < lim_dist2) {
simplex.push_back(aw_it->first);
complex.insert_simplex_and_subfaces(simplex, aw_it->second - aw.begin()->second);
aw_it++;