diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2007-09-10 10:39:56 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2007-09-10 10:39:56 +0000 |
commit | 83d0b9f3caf4bc95531c6eb1a9dea76ed98f021e (patch) | |
tree | 05b943b4cd96518941bb275acafbbfb3895c9fcd /src | |
parent | f243a1a1bd836ed45f6e37a3843868bd9bbecad7 (diff) | |
download | postgresql-83d0b9f3caf4bc95531c6eb1a9dea76ed98f021e.tar.gz postgresql-83d0b9f3caf4bc95531c6eb1a9dea76ed98f021e.zip |
Fixes from Heikki Linnakangas <heikki@enterprisedb.com>:
Apparently it's a bug I introduced when I refactored spell.c to use the
readline function for reading and recoding the input file. I didn't
notice that some calls to STRNCMP used the non-lowercased version of the
input line.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/tsearch/spell.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index e9bb9995627..9074b29af37 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.2 2007/08/25 00:03:59 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/tsearch/spell.c,v 1.3 2007/09/10 10:39:56 teodor Exp $ * *------------------------------------------------------------------------- */ @@ -733,7 +733,6 @@ NIImportAffixes(IspellDict * Conf, const char *filename) while ((recoded = t_readline(affix)) != NULL) { pstr = lowerstr(recoded); - pfree(recoded); lineno++; @@ -813,8 +812,8 @@ NIImportAffixes(IspellDict * Conf, const char *filename) flag = (unsigned char) *s; goto nextline; } - if (STRNCMP(str, "COMPOUNDFLAG") == 0 || STRNCMP(str, "COMPOUNDMIN") == 0 || - STRNCMP(str, "PFX") == 0 || STRNCMP(str, "SFX") == 0) + if (STRNCMP(recoded, "COMPOUNDFLAG") == 0 || STRNCMP(recoded, "COMPOUNDMIN") == 0 || + STRNCMP(recoded, "PFX") == 0 || STRNCMP(recoded, "SFX") == 0) { if (oldformat) ereport(ERROR, @@ -834,6 +833,7 @@ NIImportAffixes(IspellDict * Conf, const char *filename) NIAddAffix(Conf, flag, flagflags, mask, find, repl, suffixes ? FF_SUFFIX : FF_PREFIX); nextline: + pfree(recoded); pfree(pstr); } FreeFile(affix); |