From cbb397ffbd22976f39758eda399d69ab234c8184 Mon Sep 17 00:00:00 2001 From: derek Date: Wed, 19 Jan 2011 12:57:13 -0500 Subject: [PATCH] Bug fix in SamHeaderVersion::SetVersion() --- src/api/internal/SamHeaderVersion_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/internal/SamHeaderVersion_p.h b/src/api/internal/SamHeaderVersion_p.h index b569248..0b570d1 100644 --- a/src/api/internal/SamHeaderVersion_p.h +++ b/src/api/internal/SamHeaderVersion_p.h @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 23 December 2010 (DB) +// Last modified: 19 January 2010 (DB) // --------------------------------------------------------------------------- // Provides functionality for comparing SAM header versions // ************************************************************************* @@ -80,7 +80,7 @@ void SamHeaderVersion::SetVersion(const std::string& version) { // store major version if non-empty and contains only digits const std::string& majorVersion = version.substr(0, periodFound); - if ( majorVersion.empty() ) { + if ( !majorVersion.empty() ) { const size_t nonDigitFound = majorVersion.find_first_not_of(Constants::SAM_DIGITS); if ( nonDigitFound == std::string::npos ) { std::stringstream major(majorVersion); @@ -90,7 +90,7 @@ void SamHeaderVersion::SetVersion(const std::string& version) { // store minor version if non-empty and contains only digits const std::string& minorVersion = version.substr(periodFound + 1); - if ( minorVersion.empty() ) { + if ( !minorVersion.empty() ) { const size_t nonDigitFound = minorVersion.find_first_not_of(Constants::SAM_DIGITS); if ( nonDigitFound == std::string::npos ) { std::stringstream minor(minorVersion); -- 2.39.2