Skip to content

Commit 28c7fa7

Browse files
Update Src/Base/AMReX_Array4.H
Co-authored-by: Alexander Sinn <[email protected]>
1 parent 398cfc2 commit 28c7fa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/Base/AMReX_Array4.H

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace amrex {
135135
#if defined(AMREX_DEBUG) || defined(AMREX_BOUND_CHECK)
136136
index_assert(i,j,k,n);
137137
#endif
138-
return p[(i-begin.x)+(j-begin.y)*jstride()+(k-begin.z)*kstride()+n*nstride()];
138+
return p[(i-begin.x)+Long(len.x)*((j-begin.y)+Long(len.y)*((k-begin.z)+Long(len.z)*n))];
139139
}
140140

141141
template <class U=T, std::enable_if_t<!std::is_void_v<U>,int> = 0>

0 commit comments

Comments
 (0)