]> git.donarmstrong.com Git - samtools.git/blobdiff - bcftools/bcf.c
Fix in output of missing haploid genotypes
[samtools.git] / bcftools / bcf.c
index 6695c74226059ea55033792dabab3faba4dbda05..24728dbe1515e7cc1171a8cc08f842bafa167d5e 100644 (file)
@@ -269,7 +269,7 @@ void bcf_fmt_core(const bcf_hdr_t *h, bcf1_t *b, kstring_t *s)
                 if ( ploidy==1 )
                 {
                     if ( y>>7&1 )
-                        kputsn(".", 3, s);
+                        kputc('.', s);
                     else 
                         kputc('0' + (y>>3&7), s);
                 }
@@ -340,7 +340,7 @@ int remove_tag(char *str, const char *tag, char delim)
         len_diff += q-p;
         if ( ! *q ) { *p = 0; break; }  // the tag was last, no delim follows
         else
-            memmove(p,q,ori_len-(int)(p-str)-(int)(q-p)-1);  // *q==delim
+            memmove(p,q,ori_len-(int)(p-str)-(int)(q-p));  // *q==delim
     }
     if ( len_diff==ori_len )
         str[0]='.', str[1]=0, len_diff--;