# HG changeset patch # User mas01mc # Date 1235156597 0 # Node ID 4d6e2ac4de7a330a1b7f1f6c700c832c6df9340a # Parent fde17c61e797e5b9cd227ac09e2dd87d3a11a069 INDEXING: fixed reverse-lookup roundoff error when data gets very large. Computation of offset was lacking an essential cast to off_t. diff -r fde17c61e797 -r 4d6e2ac4de7a audioDB-internals.h --- 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::iterator b = (*adb->track_offsets).begin(); std::vector::iterator e = (*adb->track_offsets).end(); std::vector::iterator p = std::upper_bound(b, e, offset);