Skip to content

Commit 9764d00

Browse files
committed
fix memset and test array
1 parent 8656eb4 commit 9764d00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/vcf2table.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static int findContigs(bcf_hdr_t* hdr_in, const char* ctg1a, uint64_t len1,
616616
uint64_t len;
617617
bcf_idpair_t c = hdr_in->id[BCF_DT_CTG][i];
618618
if (c.val == NULL) continue;
619-
if (c.val->info == NULL) continue;
619+
//if (c.val->info == NULL) continue; no info is always an array
620620
len = c.val->info[0];
621621
const char* contig_name = c.key;
622622
if (len == len1 &&
@@ -726,7 +726,7 @@ const char* about(void) {
726726
*/
727727
int init(int argc, char** argv, bcf_hdr_t* hdr_in, bcf_hdr_t* out) {
728728
int c;
729-
memset((void*)&args, sizeof(args_t), 1);
729+
memset((void*)&args, 0, sizeof(args_t));
730730
args.header = hdr_in;
731731
args.out = stdout;
732732
// initialize table that will not change

0 commit comments

Comments
 (0)