From effbe18c466f050b895d20426579630a99e4305c Mon Sep 17 00:00:00 2001 From: Dan Ibanez Date: Wed, 25 Jan 2017 15:24:01 -0700 Subject: [PATCH] fix domain boundary indexing the compiler pointed out that boundary[2][2] doesn't exist. If I understand this correctly, those checks should be against boundary[*][0]. --- src/domain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain.cpp b/src/domain.cpp index 52ac9d3d1b..1dede69729 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -1600,10 +1600,10 @@ int Domain::ownatom(int id, double *x, imageint *image, int shrinkexceed) if (coord[0] < blo[0] && boundary[0][0] > 1) newcoord[0] = blo[0]; else if (coord[0] >= bhi[0] && boundary[0][1] > 1) newcoord[0] = bhi[0]; else newcoord[0] = coord[0]; - if (coord[1] < blo[1] && boundary[1][1] > 1) newcoord[1] = blo[1]; + if (coord[1] < blo[1] && boundary[1][0] > 1) newcoord[1] = blo[1]; else if (coord[1] >= bhi[1] && boundary[1][1] > 1) newcoord[1] = bhi[1]; else newcoord[1] = coord[1]; - if (coord[2] < blo[2] && boundary[2][2] > 1) newcoord[2] = blo[2]; + if (coord[2] < blo[2] && boundary[2][0] > 1) newcoord[2] = blo[2]; else if (coord[2] >= bhi[2] && boundary[2][1] > 1) newcoord[2] = bhi[2]; else newcoord[2] = coord[2];