Skip to content

Commit

Permalink
[Fix] When not provided, chr should be ~size(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
choishingwan committed Feb 24, 2020
1 parent 49cd2fa commit 9eb4120
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/genotype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ class Genotype
int parse_chr(const std::vector<std::string>& token,
const BaseFile& base_file, size_t index, size_t& chr)
{
chr = ~size_t(0);
if (!base_file.has_column[index]) return 0;
int32_t chr_code = -1;
chr = ~size_t(0);
chr_code =
get_chrom_code_raw(token[base_file.column_index[index]].c_str());
if (chr_code < 0) { return 1; }
Expand All @@ -176,7 +176,7 @@ class Genotype
bool parse_loc(const std::vector<std::string>& token,
const BaseFile& base_file, size_t index, size_t& loc)
{

loc = ~size_t(0);
if (!base_file.has_column[index]) return true;
try
{
Expand Down

0 comments on commit 9eb4120

Please sign in to comment.