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

Commit83d0b9f

Browse files
committed
Fixes from Heikki Linnakangas <heikki@enterprisedb.com>:
Apparently it's a bug I introduced when I refactored spell.c to use thereadline function for reading and recoding the input file. I didn'tnotice that some calls to STRNCMP used the non-lowercased version of theinput line.
1 parentf243a1a commit83d0b9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/backend/tsearch/spell.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.2 2007/08/25 00:03:59 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.3 2007/09/10 10:39:56 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -733,7 +733,6 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
733733
while ((recoded=t_readline(affix))!=NULL)
734734
{
735735
pstr=lowerstr(recoded);
736-
pfree(recoded);
737736

738737
lineno++;
739738

@@ -813,8 +812,8 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
813812
flag= (unsignedchar)*s;
814813
gotonextline;
815814
}
816-
if (STRNCMP(str,"COMPOUNDFLAG")==0||STRNCMP(str,"COMPOUNDMIN")==0||
817-
STRNCMP(str,"PFX")==0||STRNCMP(str,"SFX")==0)
815+
if (STRNCMP(recoded,"COMPOUNDFLAG")==0||STRNCMP(recoded,"COMPOUNDMIN")==0||
816+
STRNCMP(recoded,"PFX")==0||STRNCMP(recoded,"SFX")==0)
818817
{
819818
if (oldformat)
820819
ereport(ERROR,
@@ -834,6 +833,7 @@ NIImportAffixes(IspellDict * Conf, const char *filename)
834833
NIAddAffix(Conf,flag,flagflags,mask,find,repl,suffixes ?FF_SUFFIX :FF_PREFIX);
835834

836835
nextline:
836+
pfree(recoded);
837837
pfree(pstr);
838838
}
839839
FreeFile(affix);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp