From 4e5f1ff5bffe471194a06c8b1c41a2a7e3777304 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 24 Feb 2017 13:53:07 +0000 Subject: [PATCH] RichText: Yet another hdr/ftr fix git-svn-id: svn://ultimatepp.org/upp/trunk@10881 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/RichText/HeaderFooter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uppsrc/RichText/HeaderFooter.cpp b/uppsrc/RichText/HeaderFooter.cpp index e4b4b710e..6f748d2d5 100644 --- a/uppsrc/RichText/HeaderFooter.cpp +++ b/uppsrc/RichText/HeaderFooter.cpp @@ -100,7 +100,8 @@ void RichText::PaintHeaderFooter(PageDraw& pw, const Rect& page, const PaintInfo RichContext rc = Context(page); int last_page = -1; int pagecount = GetHeight(page).page + 1; - for(int i = 0; last_page <= to_page; i++) { + int i = 0; + while(last_page <= to_page) { while(last_page < rc.py.page) { last_page++; if(rc.header || rc.footer) {