diff options
author | Martin Poirier <theeth@yahoo.com> | 2009-03-06 17:12:12 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2009-03-06 17:12:12 +0300 |
commit | 3ecf8d3a9083264c271855efe6d148a9bb245bd2 (patch) | |
tree | 27f2e4955acae9fe5a8c62546230b6e4894f48c7 /source | |
parent | e6d742a69f1be9599cd17c026667794a4117988b (diff) |
Fix bug with transform NumInput in 2.5 (used uninit var).
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_numinput.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_numinput.c b/source/blender/editors/transform/transform_numinput.c index fc348bab719..34976105db3 100644 --- a/source/blender/editors/transform/transform_numinput.c +++ b/source/blender/editors/transform/transform_numinput.c @@ -129,7 +129,6 @@ short hasNumInput(NumInput *n) void applyNumInput(NumInput *n, float *vec) { short i, j; - float val[3]; if (hasNumInput(n)) { for (j=0; j<=n->idx_max; j++) { @@ -142,17 +141,17 @@ void applyNumInput(NumInput *n, float *vec) if (n->ctrl[i] == 0 && n->flag & NUM_NULL_ONE) { vec[j] = 1.0f; } - else if (val[i] == 0.0f && n->flag & NUM_NO_ZERO) { + else if (n->val[i] == 0.0f && n->flag & NUM_NO_ZERO) { vec[j] = 0.0001f; } else { if (n->inv[i]) { - vec[j] = 1.0f / val[i]; + vec[j] = 1.0f / n->val[i]; } else { - vec[j] = val[i]; + vec[j] = n->val[i]; } } } |