From 23c4d467d0af8ff673e2aef7625599af8a7a1dea Mon Sep 17 00:00:00 2001 From: Alexander Zhylin Date: Fri, 13 Feb 2026 14:34:29 +0200 Subject: [PATCH] fixes page number calculation --- src/file_p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_p.c b/src/file_p.c index 2914dcf..7cec685 100644 --- a/src/file_p.c +++ b/src/file_p.c @@ -70,7 +70,7 @@ void file_list(session *sess, server_data_t *s_d, i_file_list_t *f_args) { pages_count = full_count / f_args->limit; if (!pages_count) pages_count = 1; - if (pages_count > 1 && (pages_count % f_args->limit)) + if ((full_count > f_args->limit) && (pages_count % f_args->limit)) pages_count++; sprintf(page_info, ":END: PAGE %u/%lu COUNT: %lu/%lu\n", f_args->page,