diff options
Diffstat (limited to 'source/blender/bmesh/operators/bmo_connect.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index 07be4cdd5c1..69a9b75b258 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -147,11 +147,12 @@ 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) { - if (x >= 0) + if (x >= 0) { return x % len; + } else { int r = len - (-x % len); - if(r == len) + if (r == len) return len - 1; else return r; |