Permalink
Browse files

fixed #268 word clip length for very long words indexed

  • Loading branch information...
tomatolog committed May 24, 2018
1 parent 39c4eb5 commit 266b7054f98e7d30fc2829b5c2467dc9f90def92
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/sphinx.cpp
@@ -22812,7 +22812,7 @@ CSphDictKeywords::HitblockKeyword_t * CSphDictKeywords::HitblockAddKeyword ( DWO
SphWordID_t CSphDictKeywords::HitblockGetID ( const char * sWord, int iLen, SphWordID_t uCRC )
{
if ( iLen>=MAX_KEYWORD_BYTES-4 ) // fix of very long word (zones)
if ( iLen>MAX_KEYWORD_BYTES-4 ) // fix of very long word (zones)
{
memcpy ( m_sClippedWord, sWord, MAX_KEYWORD_BYTES-4 );
memset ( m_sClippedWord+MAX_KEYWORD_BYTES-4, 0, 4 );
@@ -23657,7 +23657,7 @@ class CRtDictKeywords : public ISphRtDictWraper
return 0;
// fix of very long word (zones)
if ( iLen>=( SPH_MAX_WORD_LEN*3 ) )
if ( iLen>( SPH_MAX_WORD_LEN*3 ) )
{
int iClippedLen = SPH_MAX_WORD_LEN*3;
m_sWord.SetBinary ( (const char *)pWord, iClippedLen );

0 comments on commit 266b705

Please sign in to comment.