summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev2006-08-29 13:32:21 +0000
committerTeodor Sigaev2006-08-29 13:32:21 +0000
commita3cb2221f3f610c9346f1e2d2db83d6149fb5283 (patch)
tree2a67eab9b2346aa9091816ed3ca014ae94eb17c9
parent747b82aa6a5ad7b0a1cdd4c1c94e75b02c3e715a (diff)
Fix incorrect length of lexemes in silly_cmp_tsvector()
-rw-r--r--contrib/tsearch2/tsvector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c
index 56752cf4d17..c455ac3ec54 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);