From 971178262878b79de430e930fdf30469e0f6549d Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Tue, 29 Aug 2006 13:31:54 +0000 Subject: [PATCH] Fix incorrect length of lexemes in silly_cmp_tsvector() --- contrib/tsearch2/tsvector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c index a52da49f0c..daef665400 100644 --- a/contrib/tsearch2/tsvector.c +++ b/contrib/tsearch2/tsvector.c @@ -979,7 +979,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);