diff --git a/ZRColaCompile/dbsource.cpp b/ZRColaCompile/dbsource.cpp index d6e1ce0..37f4d14 100644 --- a/ZRColaCompile/dbsource.cpp +++ b/ZRColaCompile/dbsource.cpp @@ -65,8 +65,8 @@ bool ZRCola::DBSource::character_desc_idx::add_keywords(const wchar_t *str, wcha std::wstring::size_type j_end = term.size(); if (j_end >= sub) { // Insert all keyword substrings "sub" or more characters long. - for (std::wstring::size_type i = 0, i_end = j_end - sub; i < i_end; ++i) { - for (std::wstring::size_type j = i + sub; j < j_end; ++j) + for (std::wstring::size_type i = 0, i_end = j_end - sub; i <= i_end; ++i) { + for (std::wstring::size_type j = i + sub; j <= j_end; ++j) add_keyword(term.substr(i, j - i), chr); } } diff --git a/output/data/ZRCola.zrcdb b/output/data/ZRCola.zrcdb index 66487c8..e3d9b45 100644 Binary files a/output/data/ZRCola.zrcdb and b/output/data/ZRCola.zrcdb differ