From 4c39f958c0c74a82d071f54648b8aba46b88b3e7 Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Fri, 17 Jan 2025 15:57:23 +0100 Subject: [PATCH] Bump to 0.4.8, include changes for pointer arithmetic and also allow a mismatch between header and data contig order. --- bigWig.h | 2 +- bwValues.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bigWig.h b/bigWig.h index 441afea..f157a74 100644 --- a/bigWig.h +++ b/bigWig.h @@ -56,7 +56,7 @@ extern "C" { /*! * The library version number */ -#define LIBBIGWIG_VERSION 0.4.7 +#define LIBBIGWIG_VERSION 0.4.8 /*! * If 1, then this library was compiled with remote file support. diff --git a/bwValues.c b/bwValues.c index 11b616b..98ba246 100644 --- a/bwValues.c +++ b/bwValues.c @@ -135,8 +135,7 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_ if(!o) return NULL; for(i=0; inChildren; i++) { - if(tid < node->chrIdxStart[i]) break; - if(tid > node->chrIdxEnd[i]) continue; + if(tid < node->chrIdxStart[i] || tid > node->chrIdxEnd[i]) continue; /* The individual blocks can theoretically span multiple contigs. @@ -162,7 +161,6 @@ static bwOverlapBlock_t *overlapsLeaf(bwRTreeNode_t *node, uint32_t tid, uint32_ if(!o->size) goto error; for(i=0; inChildren; i++) { - if(tid < node->chrIdxStart[i]) break; if(tid < node->chrIdxStart[i] || tid > node->chrIdxEnd[i]) continue; if(node->chrIdxStart[i] != node->chrIdxEnd[i]) { if(tid == node->chrIdxStart[i]) {