Cycles Bake: Fix overflow when using hundreds of images

We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.

Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
This commit is contained in:
Dalai Felinto 2017-08-24 10:34:50 +02:00
parent 76b74a93a8
commit 1fb2637006
1 changed files with 1 additions and 1 deletions

View File

@ -1029,7 +1029,7 @@ cage_cleanup:
}
else {
/* if everything else fails, use the material index */
char tmp[4];
char tmp[5];
sprintf(tmp, "%d", i % 1000);
BLI_path_suffix(name, FILE_MAX, tmp, "_");
}