Skip to content

Commit

Permalink
Fix a memmove indexing error
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 authored and jkbonfield committed Mar 14, 2024
1 parent 9177464 commit 03899cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vcf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ static int vcf_parse_format_gt6(kstring_t *s, const bcf_hdr_t *h, bcf1_t *v,
if ( fmt[i].size==-1 )
{
v->n_fmt--;
if ( i+1<v->n_fmt ) memmove(&fmt[i],&fmt[i+1],sizeof(*fmt)*v->n_fmt);
if ( i < v->n_fmt ) memmove(&fmt[i],&fmt[i+1],sizeof(*fmt)*(v->n_fmt-i));
}
else
i++;
Expand Down

0 comments on commit 03899cb

Please sign in to comment.