From: Teodor Sigaev Date: Tue, 29 Aug 2006 13:32:21 +0000 (+0000) Subject: Fix incorrect length of lexemes in silly_cmp_tsvector() X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=904f30c2d8b586bf36f559825dddb7a81bce5c67;p=users%2Fbernd%2Fpostgres.git Fix incorrect length of lexemes in silly_cmp_tsvector() --- diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c index 56752cf4d1..c455ac3ec5 100644 --- a/contrib/tsearch2/tsvector.c +++ b/contrib/tsearch2/tsvector.c @@ -975,7 +975,7 @@ silly_cmp_tsvector(const tsvector * a, const tsvector * b) return ( aptr->pos > bptr->pos ) ? -1 : 1; } else if ( aptr->len != bptr->len ) { return ( aptr->len > bptr->len ) ? -1 : 1; - } else if ( (res=strncmp(STRPTR(a) + aptr->pos, STRPTR(b) + bptr->pos, b->len))!= 0 ) { + } else if ( (res=strncmp(STRPTR(a) + aptr->pos, STRPTR(b) + bptr->pos, bptr->len))!= 0 ) { return res; } else if ( aptr->haspos ) { WordEntryPos *ap = POSDATAPTR(a, aptr);