diff options
-rw-r--r-- | Carpet/CarpetLib/src/bbox.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc index 4c98242f0..e26daf9c7 100644 --- a/Carpet/CarpetLib/src/bbox.cc +++ b/Carpet/CarpetLib/src/bbox.cc @@ -49,7 +49,7 @@ template<class T, int D> T bbox<T,D>::size () const { if (empty()) return 0; // return prod((shape()+stride()-1)/stride()); - const vect<T,D> sh((shape()+stride()-1)/stride()); + const vect<T,D> sh((shape()+stride()-T(1))/stride()); T sz = 1, max = numeric_limits<T>::max(); for (int d=0; d<D; ++d) { assert (sh[d] <= max); |