Add assert to check for buffer overrun

This commit is contained in:
2014-05-16 18:09:24 +10:00
parent 980c1a98e9
commit 03526232d9

View File

@@ -1399,6 +1399,7 @@ static void calc_bevfac_mapping(Curve *cu, BevList *bl, int *r_start, float *r_f
total_length += bevp_array[i - 1];
tmpf += bevp_array[i - 1];
if ((i % cu->resolu) == 0 || (bl->nr - 1) == i) {
BLI_assert(j < segcount);
segments[j++] = tmpf;
tmpf = 0.0f;
}