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:
parent
76b74a93a8
commit
1fb2637006
|
@ -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, "_");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue