1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 09:15:38 +01:00

Safety check

This commit is contained in:
Peter Boyle 2019-07-12 17:10:35 +01:00
parent 6e3c3214a3
commit 3d58daf70f

View File

@ -766,7 +766,7 @@ public:
int permute_slice=0;
if(permute_dim){
int wrap = sshift/rd;
int wrap = sshift/rd; wrap=wrap % ly; // but it is local anyway
int num = sshift%rd;
if ( x< rd-num ) permute_slice=wrap;
else permute_slice = (wrap+1)%ly;