diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-05-06 13:20:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-05-06 13:20:03 +0400 |
commit | 35380cdcad60a30d51a6fb6ae4e9f3606067aa5b (patch) | |
tree | 26e3404579e51ba236022353d0108615b6b851ee /source/blender/editors/util | |
parent | 7fddd7f013f15590b75e20f00c47f29ae1d47eb7 (diff) |
Fix for uninitialized unit_use_radians variable with inset and bevel
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/numinput.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 850f1d1c5cc..ee391af185d 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -70,17 +70,20 @@ enum { void initNumInput(NumInput *n) { - n->unit_sys = USER_UNIT_NONE; - n->unit_type[0] = n->unit_type[1] = n->unit_type[2] = B_UNIT_NONE; - n->idx = 0; n->idx_max = 0; + n->unit_sys = USER_UNIT_NONE; + fill_vn_i(n->unit_type, NUM_MAX_ELEMENTS, B_UNIT_NONE); + n->unit_use_radians = false; + n->flag = 0; - n->val_flag[0] = n->val_flag[1] = n->val_flag[2] = 0; - zero_v3(n->val_org); + fill_vn_short(n->val_flag, NUM_MAX_ELEMENTS, 0); zero_v3(n->val); + fill_vn_fl(n->val_org, NUM_MAX_ELEMENTS, 0.0f); + fill_vn_fl(n->val_inc, NUM_MAX_ELEMENTS, 1.0f); + + n->idx = 0; n->str[0] = '\0'; n->str_cur = 0; - copy_v3_fl(n->val_inc, 1.0f); } /* str must be NUM_STR_REP_LEN * (idx_max + 1) length. */ |