Added check for invalid index

This commit is contained in:
Thorsten Sommer 2020-08-01 09:54:31 +02:00
parent 79eb5fc9c9
commit 3f76c61d94

View File

@ -156,6 +156,9 @@ namespace Exa
break;
}
if (chunkIndex >= this.chunks.Length || elementIndex >= this.chunks[chunkIndex].Length)
throw new IndexOutOfRangeException();
return this.chunks[chunkIndex][elementIndex];
}