Skip to content

Commit

Permalink
Proper ploidy initialization when the sexes are added explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3 authored and mcshane committed Aug 5, 2015
1 parent 21aca6d commit 90d0a6a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ploidy.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ int ploidy_add_sex(ploidy_t *ploidy, const char *sex)
ploidy->nsex++;
hts_expand0(char*,ploidy->nsex,ploidy->msex,ploidy->id2sex);
ploidy->id2sex[ploidy->nsex-1] = strdup(sex);
ploidy->sex2dflt = (int*) realloc(ploidy->sex2dflt,sizeof(int)*ploidy->nsex);
ploidy->sex2dflt[ploidy->nsex-1] = ploidy->dflt;
return khash_str2int_inc(ploidy->sex2id, ploidy->id2sex[ploidy->nsex-1]);
}

Expand Down

0 comments on commit 90d0a6a

Please sign in to comment.