Mercurial > hg > audiodb
changeset 556:4d6e2ac4de7a multiprobeLSH
INDEXING: fixed reverse-lookup roundoff error when data gets very large. Computation of offset was lacking an essential cast to off_t.
author | mas01mc |
---|---|
date | Fri, 20 Feb 2009 19:03:17 +0000 |
parents | fde17c61e797 |
children | 18b3d4c9e93d |
files | audioDB-internals.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/audioDB-internals.h Fri Feb 13 11:24:39 2009 +0000 +++ b/audioDB-internals.h Fri Feb 20 19:03:17 2009 +0000 @@ -284,7 +284,7 @@ } static inline uint32_t audiodb_index_to_track_id(adb_t *adb, uint32_t lshid){ - off_t offset = lshid*adb->header->dim*sizeof(double); + off_t offset = (off_t)lshid*adb->header->dim*sizeof(double); std::vector<off_t>::iterator b = (*adb->track_offsets).begin(); std::vector<off_t>::iterator e = (*adb->track_offsets).end(); std::vector<off_t>::iterator p = std::upper_bound(b, e, offset);