mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
fix core when doing queries with &'s in them
This commit is contained in:
parent
3f584ecdaa
commit
030e1c7c1f
@ -304,6 +304,12 @@ long Synonyms::getSynonyms ( Words *words ,
|
||||
*m_termPtrsPtr++ = p;
|
||||
*m_termLensPtr++ = e-p;
|
||||
|
||||
// increment the dummies to keep in sync with synonym index
|
||||
// this is only for when m_termPtrs[x] is NULL because
|
||||
// we store the term into m_synWordBuf() because it is not
|
||||
// in out wiktionary file in memory.
|
||||
*m_termOffsPtr++ = -1;
|
||||
|
||||
// only for multi-word synonyms like "New Jersey"...
|
||||
*m_wids0Ptr = 0LL;
|
||||
*m_wids1Ptr = 0LL;
|
||||
@ -381,9 +387,10 @@ bool Synonyms::addWithoutApostrophe ( long wordNum , HashTableX *dt ) {
|
||||
*m_wids0Ptr++ = 0LL;
|
||||
*m_wids1Ptr++ = 0LL;
|
||||
*m_termPtrsPtr++ = NULL;
|
||||
*m_termLensPtr++ = wlen;
|
||||
|
||||
*m_termOffsPtr++ = m_synWordBuf.length();
|
||||
*m_termLensPtr++ = wlen;
|
||||
|
||||
m_synWordBuf.safeMemcpy(w,wlen);
|
||||
m_synWordBuf.pushChar('\0');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user