From 862917c6082bc469f03f91dc3a2273a4d45c7f17 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 15 Sep 2016 13:50:55 +0100 Subject: [PATCH] Corrected out-of-bounds bug for upper bounds in build_voxels_from_array_mask function. --- gprMax/geometry_primitives.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gprMax/geometry_primitives.pyx b/gprMax/geometry_primitives.pyx index 9ec190cc..c65e041b 100644 --- a/gprMax/geometry_primitives.pyx +++ b/gprMax/geometry_primitives.pyx @@ -719,9 +719,9 @@ cpdef void build_voxels_from_array_mask(int xs, int ys, int zs, int waternumID, cdef int xf, yf, zf, numID, numIDx, numIDy, numIDz # Set upper bounds - xf = xs + data.shape[0] - yf = ys + data.shape[1] - zf = zs + data.shape[2] + xf = xs + data.shape[0] - 1 + yf = ys + data.shape[1] - 1 + zf = zs + data.shape[2] - 1 for i in range(xs, xf): for j in range(ys, yf):