]> git.donarmstrong.com Git - samtools.git/blobdiff - bcftools/vcf.c
* fixed a minor issue in printing VCFs
[samtools.git] / bcftools / vcf.c
index 9b661ff5b4fbc29dde6a53b5e71c027f131a81f4..b3832e7c6ff8b15aef729d9ed3faa8c4223aa78a 100644 (file)
@@ -101,7 +101,7 @@ int vcf_hdr_write(bcf_t *bp, const bcf_hdr_t *h)
                fwrite(h->txt, 1, h->l_txt - 1, v->fpout);
                if (strstr(h->txt, "##SQ=")) has_ref = 1;
        }
-       if (has_ver == 0) fprintf(v->fpout, "##fileformat=VCFv4.0\n");
+       if (h->l_txt == 0) fprintf(v->fpout, "##fileformat=VCFv4.0\n");
        fprintf(v->fpout, "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT");
        for (i = 0; i < h->n_smpl; ++i)
                fprintf(v->fpout, "\t%s", h->sns[i]);