Fixed a bug in the array indexing that was causing heap corruption
This commit is contained in:
parent
432d406f26
commit
7d7f66c626
|
@ -233,7 +233,7 @@ public:
|
|||
|
||||
inline tockArrayView<T,DIMS - 1> operator[] (const unsigned index) const
|
||||
{
|
||||
return tockArrayView<T,DIMS - 1>(realArray + (totalSubDim * index),dims,totalSubDim / dims[0]);
|
||||
return tockArrayView<T,DIMS - 1>(realArray + (totalSubDim * index),dims,DIMS <= 1 ? 1 : (totalSubDim / dims[1]));
|
||||
}
|
||||
|
||||
inline tockArrayView<T,DIMS> sliceFor(const unsigned amount) const
|
||||
|
|
Loading…
Reference in New Issue
Block a user