From f912d9f024ddd4aad444133007c5cbe1987235c2 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sat, 12 Jul 2014 12:18:33 +0000 Subject: Fixed URL list not working anymore (tom swift) --- src/htslib.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/htslib.h b/src/htslib.h index aa5d341..9a5cac9 100644 --- a/src/htslib.h +++ b/src/htslib.h @@ -541,8 +541,9 @@ HTS_STATIC int compare_mime(httrackp * opt, const char *mime, const char *file, // returns (size_t) -1 upon error static HTS_UNUSED size_t off_t_to_size_t(off_t o) { - if (o >= 0 && o < (off_t) ( (size_t) -1 ) / 2) { - return (size_t) o; + const size_t so = (size_t) o; + if ((off_t) so == o) { + return so; } else { return (size_t) -1; } -- cgit v1.2.3