http://bugs.openzim.org/show_bug.cgi?id=33

           Summary: file::findxByTitle() fails
           Product: openZIM
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: zimlib
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
   Estimated Hours: 0.0


It seems that zimlib file::findxByTitle() always returns an good result
iterator which is deincremented of one (so always wrong).

code:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
      zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===

code with workaround:
===
std::pair<bool, zim::File::const_iterator> resultPair =
zimFileHandler->findxByTitle('A', title);
if (resultPair.first == true) {
      zim::Article article =
zimFileHandler->getArticle(resultPair.second.getIndex()+1);
}
===

-- 
Configure bugmail: http://bugs.openzim.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
dev-l mailing list
[email protected]
https://intern.openzim.org/mailman/listinfo/dev-l

Reply via email to