From a863333e37e846223cac5dfdeaecea35c62062bd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Oct 2006 22:58:23 +0000 Subject: [PATCH] fixed off by 2 error in HasPage() (patch 1562871) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmprint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 80fa773564..5b33c6e860 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -276,7 +276,7 @@ void wxHtmlPrintout::GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, i bool wxHtmlPrintout::HasPage(int pageNum) { - return (pageNum >= 1 && pageNum-1 <= (signed)m_PageBreaks.Count()); + return pageNum > 0 && (unsigned)pageNum < m_PageBreaks.Count(); } -- 2.45.2