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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-26 17:33:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-26 17:33:04 +0400
commitca293c835f15e8b0d19116456c75ba971f02e16b (patch)
treed61701c08e9622add0d1ceff6d4c5ce4d5de2fe1 /source/blender/editors/transform/transform_snap.c
parent40353fe0d841e006d11ad5833eaedbc93fc0d608 (diff)
correct misc warnings
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index d9d9b0f9102..a4307ea336d 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -1944,6 +1944,11 @@ static void applyGrid(TransInfo *t, float *val, int max_index, float fac[3], Gea
int i;
float asp[3] = {1.0f, 1.0f, 1.0f}; // TODO: Remove hard coded limit here (3)
+ if(max_index > 3) {
+ printf("applyGrid: invalid index %d, clamping\n", max_index);
+ max_index= 3;
+ }
+
// Early bailing out if no need to snap
if (fac[action] == 0.0f)
return;