From b357585852d5a43e0399f13f80ec5474d7e67e63 Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sat, 14 May 2022 16:16:57 +0200 Subject: pictureflow: Fix slide_index bound Parameters for fbound were in the wrong order and slide_frame wasn't assigned the bounded value Change-Id: I9b466e8b45e4318cadf59298f8c1145fa4d30ede --- apps/plugins/pictureflow/pictureflow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 65efed72c7..38f24732de 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -3169,14 +3169,14 @@ static inline void set_current_slide(const int slide_index) { int old_center_index = center_index; step = 0; - center_index = fbound(slide_index, 0, number_of_slides - 1); + center_index = fbound(0, slide_index, number_of_slides - 1); if (old_center_index != center_index) { rb->queue_remove_from_head(&thread_q, EV_WAKEUP); rb->queue_post(&thread_q, EV_WAKEUP, 0); } target = center_index; - slide_frame = slide_index << 16; + slide_frame = center_index << 16; reset_slides(); } -- cgit v1.2.3