Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-08-24 11:34:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-09-04 16:43:12 +0300
commit9ca3d4cbbde88edc6ce6c761dd9f8a7036a04840 (patch)
treeed9708dc3836604f55077f4162fe04f1f8ab49b5 /source
parent0bee12697737718345da3ce8dacce5e7d0523454 (diff)
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).
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/object_bake_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index ad43c48f0b9..f8ad5865887 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -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, "_");
}