Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65a69df

Browse files
committed
Fix bogus affix-merging code.
NISortAffixes() compared successive compound affixes incorrectly,thus possibly failing to merge identical affixes, or (less likely)merging ones that shouldn't be merged. The user-visible effectsof this are unclear, to me anyway.Per bug #15150 from Alexander Lakhin. It's been broken for a long time,so back-patch to all supported branches.Arthur ZakirovDiscussion:https://postgr.es/m/152353327780.31225.13445405496721177988@wrigleys.postgresql.org
1 parentb8ca984 commit65a69df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/backend/tsearch/spell.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,16 +1963,18 @@ NISortAffixes(IspellDict *Conf)
19631963
if ((Affix->flagflags&FF_COMPOUNDFLAG)&&Affix->replen>0&&
19641964
isAffixInUse(Conf,Affix->flag))
19651965
{
1966+
boolissuffix= (Affix->type==FF_SUFFIX);
1967+
19661968
if (ptr==Conf->CompoundAffix||
1967-
ptr->issuffix!= (ptr-1)->issuffix||
1969+
issuffix!= (ptr-1)->issuffix||
19681970
strbncmp((constunsignedchar*) (ptr-1)->affix,
19691971
(constunsignedchar*)Affix->repl,
19701972
(ptr-1)->len))
19711973
{
19721974
/* leave only unique and minimals suffixes */
19731975
ptr->affix=Affix->repl;
19741976
ptr->len=Affix->replen;
1975-
ptr->issuffix=(Affix->type==FF_SUFFIX);
1977+
ptr->issuffix=issuffix;
19761978
ptr++;
19771979
}
19781980
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp