[Bf-blender-cvs] [cf0e7af07ec] master: BLI: fix axis order in 'BLI_array_iter_spiral_square'
Germano Cavalcante
noreply at git.blender.org
Mon Apr 5 19:29:38 CEST 2021
Commit: cf0e7af07ec7315b79f779e0179f12290e2aa54f
Author: Germano Cavalcante
Date: Mon Apr 5 12:56:07 2021 -0300
Branches: master
https://developer.blender.org/rBcf0e7af07ec7315b79f779e0179f12290e2aa54f
BLI: fix axis order in 'BLI_array_iter_spiral_square'
x and y were inverted.
===================================================================
M source/blender/blenlib/intern/array_utils.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list