Merge pull request #645 from bska/fix-out-of-bounds-indexing

effectiveExtent: Fix out-of-bounds indexing
This commit is contained in:
Atgeirr Flø Rasmussen 2014-09-01 13:39:40 +02:00
commit a8bce79f15

View File

@ -221,12 +221,11 @@ namespace WellsManagerDetail
extent[2] *= ntg;
const auto p = directionIndices(direction);
const std::array<double,3>::size_type d = extent.size();
std::array<double,3>
D = {{ extent[ p[0]*(d + 1) ] ,
extent[ p[1]*(d + 1) ] ,
extent[ p[2]*(d + 1) ] }};
D = {{ extent[ p[0] ] ,
extent[ p[1] ] ,
extent[ p[2] ] }};
return D;
}