Assert that all cells are in range.

This will (hopefully) prevent the issues fixed in commits aaae8e1 and
462c7cf from reoccurring.
This commit is contained in:
Bård Skaflestad 2012-08-22 11:40:13 +02:00
parent bb6563ffc0
commit 2b610dfce7

View File

@ -590,6 +590,9 @@ get_zcorn_sign(int nx, int ny, int nz, const int *actnum,
c1 = i/2 + nx*(j/2 + ny*(k/2));
c2 = i/2 + nx*(j/2 + ny*((k+1)/2));
assert (c1 < (nx * ny * nz));
assert (c2 < (nx * ny * nz));
if (((actnum == NULL) ||
(actnum[c1] && actnum[c2]))
&& (z2 < z1)) {