diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2006-12-26 14:54:24 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2006-12-26 14:54:24 +0000 |
commit | 49b64d346ff474ee13bea48119a5ef61e3700f95 (patch) | |
tree | 9a8e5fef77cccbe4fee5080b8a42b368bb23a79f | |
parent | 39def593c5b9b2c694efada0a1d9ba358c888ed5 (diff) | |
download | postgresql-49b64d346ff474ee13bea48119a5ef61e3700f95.tar.gz postgresql-49b64d346ff474ee13bea48119a5ef61e3700f95.zip |
Fix memory reallocation condition
-rw-r--r-- | contrib/tsearch2/dict_thesaurus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/tsearch2/dict_thesaurus.c b/contrib/tsearch2/dict_thesaurus.c index 12ab7f222a0..3975e4e832f 100644 --- a/contrib/tsearch2/dict_thesaurus.c +++ b/contrib/tsearch2/dict_thesaurus.c @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.6 2006/10/04 00:29:46 momjian Exp $ */ +/* $PostgreSQL: pgsql/contrib/tsearch2/dict_thesaurus.c,v 1.7 2006/12/26 14:54:24 teodor Exp $ */ /* * thesaurus @@ -118,7 +118,7 @@ addWrd(DictThesaurus * d, char *b, char *e, uint16 idsubst, uint16 nwrd, uint16 { nres = ntres = 0; - if (idsubst <= d->nsubst) + if (idsubst >= d->nsubst) { if (d->nsubst == 0) { |