]> git.donarmstrong.com Git - samtools.git/commitdiff
Allow tabs in the CO header field
authorPetr Danecek <pd3@sanger.ac.uk>
Fri, 11 Dec 2009 09:36:18 +0000 (09:36 +0000)
committerPetr Danecek <pd3@sanger.ac.uk>
Fri, 11 Dec 2009 09:36:18 +0000 (09:36 +0000)
sam_header.c

index a119c02b9c4cfaa0e6c4251454fd86cd12db3743..3879f3fc2a80fbd65ffd1dcb8c6858b280707378 100644 (file)
@@ -345,7 +345,11 @@ static HeaderLine *sam_header_line_parse(const char *headerLine)
         while (*to && *to!='\t') to++;
 
         if ( !required_tags[itype] && !optional_tags[itype] )
+        {
+            // CO is a special case, it can contain anything, including tabs
+            if ( *to ) { to++; continue; }
             tag = new_tag("  ",from,to-1);
+        }
         else
             tag = new_tag(from,from+3,to-1);