From e7478390e4e568cd72ba245d6b3663815800c618 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Sat, 4 Feb 2017 00:34:47 +1000 Subject: [PATCH] * fix bitmap diff calc in simdb_search() --- src/database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database.c b/src/database.c index f7f1222..4c4a798 100644 --- a/src/database.c +++ b/src/database.c @@ -434,7 +434,7 @@ simdb_search(simdb_t *db, simdb_search_t *search, simdb_urec_t *sample) { /* either source or target ratio not set, can't compare, skip test */ } /* - compare bitmap - more expensive */ - match.d_bitmap = simdb_bitmap_compare(rec->bitmap, sample->bitmap) / SIMDB_BITMAP_BITS; + match.d_bitmap = simdb_bitmap_compare(rec->bitmap, sample->bitmap) / (float) SIMDB_BITMAP_BITS; if (match.d_bitmap > search->d_bitmap) continue; /* whoa! a match found */