Closed cbuttner closed 4 months ago
Slicing by length does not seem to do a complete bounds check.
int[4] array; int[] slice = &array; // These are all caught to be out of bounds // int[] slice1 = slice[2..5]; // int[] slice2 = slice[6..]; // int[] slice3 = slice[0..9]; // int[] slice4 = slice[5:10]; // These ones aren't int[] slice5 = slice[:10]; int[] slice6 = slice[2:10];
This should now be fixed in dev and master.
Looks good. This will help to catch some bugs.
Thank you for reporting it!
Slicing by length does not seem to do a complete bounds check.