From 52f7c79db8585bdcac6789bb187f6e8c239fd3bc Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 7 Nov 2014 23:37:51 +0100 Subject: [PATCH] CComponentsForm: fix init value of getPageCount() value is always 1 --- src/gui/components/cc_frm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 9237050b1..cf40cc7d1 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -549,14 +549,14 @@ void CComponentsForm::setPageCount(const u_int8_t& pageCount) u_int8_t CComponentsForm::getPageCount() { - u_int8_t num = 0; + u_int8_t num = 1; for(size_t i=0; igetPageNumber(); num = max(item_num, num); } //convert type, possible -Wconversion warnings! - page_count = static_cast(num + 1); + page_count = static_cast(num); return page_count; }