-rw-r--r-- | noncore/apps/opie-reader/plucker_base.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ -283,16 +283,17 @@ 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; do { thisrec++; locpos += bs; gotorecordnumber(thisrec); @@ -300,17 +301,17 @@ void CPlucker_base::locate(unsigned int n) if (thishdr_type < 2) { bs = thishdr_size; } else { bs = 0; } - } while (locpos + bs < n); + } while (locpos + bs < np1); // qDebug("Time(2): %u", clock()-start); /* if (recptr != thisrec) { qDebug("Disaster:recptr:%u thisrec:%u", recptr, thisrec); UInt16 thishdr_uid, thishdr_nParagraphs; UInt32 thishdr_size = buffercontent; |