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/blenlib/intern/listbase.c')
-rw-r--r--source/blender/blenlib/intern/listbase.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index fe5f9f7673f..e43c4b07a87 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -485,7 +485,8 @@ bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step)
BLI_assert(BLI_findindex(listbase, link) != -1);
/* find link to insert before/after */
- for (int i = 0; i < ABS(step); i++) {
+ const int abs_step = abs(step);
+ for (int i = 0; i < abs_step; i++) {
hook = is_up ? hook->prev : hook->next;
if (!hook) {
return false;