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: tommi(a)tntnet.org
ReportedBy: emmanuel(a)engelhart.org
CC: dev-l(a)openzim.org
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.