From: Derek Date: Mon, 13 Sep 2010 18:50:05 +0000 (-0400) Subject: Fixed off-by-one error in BamAlignment::GetEndPosition() X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7eee95124eb52bee48d75bbbfc5ab5f2720bfe63;p=bamtools.git Fixed off-by-one error in BamAlignment::GetEndPosition() --- diff --git a/src/api/BamAux.h b/src/api/BamAux.h index 2c1c7ac..c8a6585 100644 --- a/src/api/BamAux.h +++ b/src/api/BamAux.h @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 10 September 2010 (DB) +// Last modified: 13 September 2010 (DB) // --------------------------------------------------------------------------- // Provides the basic constants, data structures, etc. for using BAM files // *************************************************************************** @@ -435,7 +435,7 @@ int BamAlignment::GetEndPosition(bool usePadded) const { alignEnd += (*cigarIter).Length; } } - return alignEnd; + return alignEnd - 1; } inline