Fix uninitialized value in RankedMatch

This commit is contained in:
Maxime Coste 2016-03-24 22:04:56 +00:00
parent 840b7658fd
commit ccb53eca42
2 changed files with 3 additions and 1 deletions

View File

@ -91,6 +91,8 @@ RankedMatch::RankedMatch(StringView candidate, StringView query)
bool RankedMatch::operator<(const RankedMatch& other) const
{
kak_assert((bool)*this and (bool)other);
if (m_prefix != other.m_prefix)
return m_prefix;

View File

@ -21,7 +21,7 @@ private:
bool m_first_char_match = false;
bool m_prefix = false;
int m_word_boundary_match_count = 0;
int m_match_index_sum;
int m_match_index_sum = 0;
bool m_only_word_boundary = false;
};