Fix sanity check for max value of level in FarMeshFactory::sumList()

Closes #73
This commit is contained in:
manuelk 2012-09-12 13:05:11 -07:00
parent 07b4c064d0
commit 56d4bbdd3c

View File

@ -187,7 +187,7 @@ template <class T, class U>
template <class Type> int
FarMeshFactory<T,U>::sumList( std::vector<std::vector<Type> > const & list, int level) {
level = std::min(level, (int)list.size());
level = std::min(level, (int)list.size()-1);
int total = 0;
for (int i=0; i<=level; ++i)
total += (int)list[i].size();