From: barnett Date: Wed, 31 Mar 2010 18:36:11 +0000 (+0000) Subject: Major fix in handling tag data in BamAux.h... checking for null characters in BamAlig... X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fd6ca20fb63a49b46a0e97e5c47402bc307b57f1;p=bamtools.git Major fix in handling tag data in BamAux.h... checking for null characters in BamAlignment::GetReadGroup() and similar methods git-svn-id: svn+ssh://gene.bc.edu/home/subversion/Derek/BamTools/trunk@45 9efb377e-2e27-44b9-b91a-ec4abb80ed8b --- diff --git a/BamAux.h b/BamAux.h index 7ece317..8e92bea 100644 --- a/BamAux.h +++ b/BamAux.h @@ -143,7 +143,9 @@ struct BamAlignment { } // get the storage class and find the next tag + if (*pTagStorageType == '\0') { return false; } SkipToNextTag( *pTagStorageType, pTagData, numBytesParsed ); + if (*pTagData == '\0') { return false; } } // return if the read group tag was not present @@ -181,7 +183,9 @@ struct BamAlignment { } // get the storage class and find the next tag + if (*pTagStorageType == '\0') { return false; } SkipToNextTag( *pTagStorageType, pTagData, numBytesParsed ); + if (*pTagData == '\0') { return false; } } // return if the edit distance tag was not present if ( !foundEditDistanceTag ) { return false; }