summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-07-12 12:18:33 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-07-12 12:18:33 +0000
commitf912d9f024ddd4aad444133007c5cbe1987235c2 (patch)
tree0731be9061d0e73182b81baf6762e5e39c92321a
parent8b8cce197a3174fafd960a6312ade54e56b063da (diff)
Fixed URL list not working anymore (tom swift)
-rw-r--r--src/htslib.h5
1 files changed, 3 insertions, 2 deletions
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;
}