Fix out of bounds array access in mathutils.noise

Regression in 0b2d1badec.
This commit is contained in:
Campbell Barton 2020-10-22 14:03:00 +11:00
parent 8da5599003
commit c70650785b
Notes: blender-bot 2023-02-14 03:31:57 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 2 additions and 2 deletions

View File

@ -140,11 +140,11 @@ static void next_state(void)
left = N;
next = state;
for (j = N - M + 1; j--; p++) {
for (j = N - M + 1; --j; p++) {
*p = p[M] ^ TWIST(p[0], p[1]);
}
for (j = M; j--; p++) {
for (j = M; --j; p++) {
*p = p[M - N] ^ TWIST(p[0], p[1]);
}