X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bam_plcmd.c;h=bba62cbcdcabe52cbdba71ab71a6b2e5681aa032;hb=fe25084a4eac12a94042805e6529ad19a2b70c28;hp=2c333e8c668cb1a48464637d2e56e2e3984d7269;hpb=27eec65490fb3461f0af054868d9a0949e1843ed;p=samtools.git diff --git a/bam_plcmd.c b/bam_plcmd.c index 2c333e8..bba62cb 100644 --- a/bam_plcmd.c +++ b/bam_plcmd.c @@ -701,7 +701,8 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn) bh->l_smpl = s.l; bh->sname = malloc(s.l); memcpy(bh->sname, s.s, s.l); - bh->l_txt = 0; + bh->txt = malloc(strlen(BAM_VERSION) + 64); + bh->l_txt = 1 + sprintf(bh->txt, "##samtoolsVersion=%s\n", BAM_VERSION); free(s.s); bcf_hdr_sync(bh); bcf_hdr_write(bp, bh);