Ignore:
Timestamp:
May 25, 2006, 4:09:55 PM (16 years ago)
Author:
Eugene Romanenko
Message:

poppler updated to version 0.5.2, also needed changes to be compatible with new poppler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/XRef.cc

    r2 r27  
    938938int XRef::getNumEntry(int offset) const
    939939{
    940   int res = -1;
    941   int resOffset = -1;
    942   XRefEntry e;
    943   for (int i = 0; i < size; ++i)
     940  if (size > 0)
    944941  {
    945     e = entries[i];
    946     if (e.offset < offset && e.offset > resOffset)
     942    int res = 0;
     943    Guint resOffset = entries[0].offset;
     944    XRefEntry e;
     945    for (int i = 1; i < size; ++i)
    947946    {
    948       res = i;
    949       resOffset = e.offset;
    950     }
    951   }
    952   return res;
     947      e = entries[i];
     948      if (e.offset < offset && e.offset >= resOffset)
     949      {
     950        res = i;
     951        resOffset = e.offset;
     952      }
     953    }
     954    return res;
     955  }
     956  else return -1;
    953957}
    954958
Note: See TracChangeset for help on using the changeset viewer.