From 5ceb50842286c101c94b1077f3e8b068278ebc07 Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 26 Dec 2006 14:55:00 +0000 Subject: [PATCH] Fix memory reallocation condition --- contrib/tsearch2/dict_thesaurus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/tsearch2/dict_thesaurus.c b/contrib/tsearch2/dict_thesaurus.c index 12ab7f222a0..bdff1fd903f 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.6.2.1 2006/12/26 14:55:00 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) { -- 2.39.5