From: Vadim Zeitlin Date: Wed, 4 Oct 2006 22:58:23 +0000 (+0000) Subject: fixed off by 2 error in HasPage() (patch 1562871) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a863333e37e846223cac5dfdeaecea35c62062bd 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 --- 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(); }