diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 8acd79ba7d9..61a21022e22 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -636,7 +636,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf) bool start_found = false; const int NEIGHBOR_COUNT = 8; - int offset[8][2] = { + const int offset[8][2] = { { -1, -1 }, { 0, -1 }, { 1, -1 }, @@ -653,7 +653,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf) int imagesize = ibuf->x * ibuf->y; /* find the initial point to start outline analysis */ - for (int idx = imagesize; idx >= 0; idx--) { + for (int idx = imagesize - 1; idx != 0; idx--) { get_pixel(ibuf, idx, rgba); if (rgba[1] == 1.0f) { boundary_co[0] = idx % ibuf->x; |