mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
fix cores in catdb logic.
This commit is contained in:
parent
9e1fee2cb9
commit
0176f8d6a7
@ -308,7 +308,9 @@ bool CatRec::set ( Url *site ,
|
||||
// add the ids
|
||||
m_catids = (long*)p;
|
||||
memcpy(p, catids, 4*m_numCatids);
|
||||
p += 4*m_numCatids;
|
||||
// skip over "numCatids" NOT m_numCatids which is TRUNCATED
|
||||
// to MAX_CATIDS
|
||||
p += 4*numCatids;
|
||||
//}
|
||||
// point to the filenum so we can mod it!
|
||||
//m_filenumPtr = p;
|
||||
|
@ -509,8 +509,12 @@ void Categories::printPathFromIndex ( SafeBuf *sb ,
|
||||
if (catIndex < 1) return;
|
||||
// get the parent
|
||||
parentId = m_cats[catIndex].m_parentid;
|
||||
// print the parent(s) first
|
||||
if (parentId > 1) {
|
||||
long catid = m_cats[catIndex].m_catid;
|
||||
// . print the parent(s) first
|
||||
// . the new dmoz data dumps signify a parentless topic by
|
||||
// havings its parentid equal its catid, so avoid infinite
|
||||
// loops by checking for that here now. mdw oct 2013.
|
||||
if (parentId > 1 && parentId != catid ) {
|
||||
bool isParentRTL = isIdRTLStart(parentId);
|
||||
// print spacing here if RTL
|
||||
//if (isRTL && !raw)
|
||||
@ -569,8 +573,9 @@ void Categories::printPathCrumbFromIndex ( SafeBuf *sb,
|
||||
if (catIndex < 1) return;
|
||||
// get the parent
|
||||
parentId = m_cats[catIndex].m_parentid;
|
||||
long catid = m_cats[catIndex].m_catid;
|
||||
// print the parent(s) first
|
||||
if (parentId > 1) {
|
||||
if (parentId > 1 && parentId != catid ) {
|
||||
bool isParentRTL = isIdRTLStart(parentId);
|
||||
printPathCrumbFromId(sb, parentId, isRTL);
|
||||
// print a spacing
|
||||
|
Loading…
Reference in New Issue
Block a user