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:
@@ -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, "_");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user