diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-05 18:56:07 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-04-05 20:28:43 +0300 |
commit | cf0e7af07ec7315b79f779e0179f12290e2aa54f (patch) | |
tree | 2fb06e4a62a2f321d4b4e61841451d4a34979b1f /source/blender/blenlib | |
parent | 44c76e4ce31052501706d9d10850f3d41a5b3fcc (diff) |
BLI: fix axis order in 'BLI_array_iter_spiral_square'
x and y were inverted.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/array_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c index 57302f1ff81..25261e82cc9 100644 --- a/source/blender/blenlib/intern/array_utils.c +++ b/source/blender/blenlib/intern/array_utils.c @@ -337,10 +337,10 @@ bool _bli_array_iter_spiral_square(const void *arr_v, center[1] < arr_shape[1]); const char *arr = arr_v; - const int stride[2] = {arr_shape[1] * (int)elem_size, (int)elem_size}; + const int stride[2] = {arr_shape[0] * (int)elem_size, (int)elem_size}; /* Test center first. */ - int ofs[2] = {center[0] * stride[0], center[1] * stride[1]}; + int ofs[2] = {center[0] * stride[1], center[1] * stride[0]}; if (test_fn(arr + ofs[0] + ofs[1], user_data)) { return true; } |