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:
Diffstat (limited to 'source/blender/bmesh/operators/bmo_connect.c')
-rw-r--r--source/blender/bmesh/operators/bmo_connect.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c
index e135473fc7e..5c60704d0ee 100644
--- a/source/blender/bmesh/operators/bmo_connect.c
+++ b/source/blender/bmesh/operators/bmo_connect.c
@@ -116,7 +116,7 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op)
}
}
- BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT);
+ BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT);
BLI_array_free(loops);
BLI_array_free(verts);
@@ -141,7 +141,15 @@ static BMVert *get_outer_vert(BMesh *bm, BMEdge *e)
/* Clamp x to the interval {0..len-1}, with wrap-around */
static int clamp_index(const int x, const int len)
{
- return (x < 0) ? (len - (-x % len)) : (x % len);
+ if (x >= 0)
+ return x % len;
+ else {
+ int r = len - (-x % len);
+ if(r == len)
+ return len - 1;
+ else
+ return r;
+ }
}
/* There probably is a better way to swap BLI_arrays, or if there