From b5e14489be6687825572d6c252f477472021e78c Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 22 Nov 2010 12:47:10 -0500 Subject: [PATCH] Fixed BamRegion bug: previously only checked if refID was -1, needed to make sure all negative values were invalid --- src/api/BamAux.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/BamAux.h b/src/api/BamAux.h index cd91284..bc99cb7 100644 --- a/src/api/BamAux.h +++ b/src/api/BamAux.h @@ -132,9 +132,9 @@ struct API_EXPORT BamRegion { // member functions void clear(void) { LeftRefID = -1; LeftPosition = -1; RightRefID = -1; RightPosition = -1; } - bool isLeftBoundSpecified(void) const { return ( LeftRefID != -1 && LeftPosition != -1 ); } + bool isLeftBoundSpecified(void) const { return ( LeftRefID >= 0 && LeftPosition >= 0 ); } bool isNull(void) const { return ( !isLeftBoundSpecified() && !isRightBoundSpecified() ); } - bool isRightBoundSpecified(void) const { return ( RightRefID != -1 && RightPosition != -1 ); } + bool isRightBoundSpecified(void) const { return ( RightRefID >= 0 && RightPosition >= 0 ); } }; // ---------------------------------------------------------------- -- 2.39.2