From 2ccb0ad8b77eb3c62914f5df5b1bba3becb83617 Mon Sep 17 00:00:00 2001 From: pohly Date: Sun, 08 May 2005 16:12:13 +0000 Subject: bugfix by tim: off-by-one error when returning to a document (previous page) --- (limited to 'noncore/apps') diff --git a/noncore/apps/opie-reader/plucker_base.cpp b/noncore/apps/opie-reader/plucker_base.cpp index 51c7fa7..81614f5 100644 --- a/noncore/apps/opie-reader/plucker_base.cpp +++ b/noncore/apps/opie-reader/plucker_base.cpp @@ -288,6 +288,7 @@ void CPlucker_base::locate(unsigned int n) UInt16 thisrec = 0; unsigned long locpos = 0; unsigned long bs = 0; + unsigned int np1 = n+1; UInt16 thishdr_uid, thishdr_nParagraphs; UInt32 thishdr_size; UInt8 thishdr_type, thishdr_reserved; @@ -305,7 +306,7 @@ void CPlucker_base::locate(unsigned int n) { bs = 0; } - } while (locpos + bs < n); + } while (locpos + bs < np1); // qDebug("Time(2): %u", clock()-start); /* -- cgit v0.9.0.2