X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Franksimilarity.c;h=9455bcce4cc0b1003be29f3e1d1fbfa48303821b;hb=d089fa72c83a673c788d828687dbec88fe9d1c4a;hp=81add45f0bcb2ff3092a2e7e64406d50297f0067;hpb=1369748dd7899789c97d94801048bf942e0cc6e6;p=idzebra-moved-to-github.git diff --git a/index/ranksimilarity.c b/index/ranksimilarity.c index 81add45..9455bcc 100644 --- a/index/ranksimilarity.c +++ b/index/ranksimilarity.c @@ -1,4 +1,4 @@ -/* $Id: ranksimilarity.c,v 1.9 2006-05-19 23:20:24 adam Exp $ +/* $Id: ranksimilarity.c,v 1.10 2006-06-07 10:50:08 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -366,7 +366,12 @@ static int calc (void *set_handle, zint sysno, zint staticrank, /* staticrank = 0 is highest, MAXINT lowest */ - score = INT_MAX - staticrank; /* but score is reverse (logical) */ + if (staticrank >= INT_MAX) + score = 0; + else + { /* but score is reverse (logical) */ + score = INT_MAX - CAST_ZINT_TO_INT(staticrank); + } /* debugging statistics output */