diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-11-26 00:13:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-11-26 00:13:34 +0400 |
commit | 46cc02c5cd03f71ee58e7a2684c8bd8fe7aa55ad (patch) | |
tree | 70cdf6e2c1e4405677cf6c960f4d79a802850205 /source/blender/bmesh | |
parent | 1768bd2c3313fa2aef6434950c88aaa97fcb3792 (diff) |
Correct fix for T37617, (own recent regression)
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/operators/bmo_primitive.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index 32d33d9e1e1..76d76d9621c 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -231,10 +231,10 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op) BMOpSlot *slot_verts_out = BMO_slot_get(op->slots_out, "verts.out"); const float dia = BMO_slot_float_get(op->slots_in, "size"); - const unsigned int xtot = max_ii(1, BMO_slot_int_get(op->slots_in, "x_segments")) + 1; - const unsigned int ytot = max_ii(1, BMO_slot_int_get(op->slots_in, "y_segments")) + 1; - float xtot_inv2 = 2.0f / (xtot - 1); - float ytot_inv2 = 2.0f / (ytot - 1); + const unsigned int xtot = max_ii(2, BMO_slot_int_get(op->slots_in, "x_segments")); + const unsigned int ytot = max_ii(2, BMO_slot_int_get(op->slots_in, "y_segments")); + const float xtot_inv2 = 2.0f / (xtot - 1); + const float ytot_inv2 = 2.0f / (ytot - 1); BMVert **varr; BMVert *vquad[4]; |