Skip to content

Commit

Permalink
exits with return value 1 on tabix parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
vasudeva8 authored and whitwham committed Feb 14, 2025
1 parent 1682e5e commit 243e97e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tbx.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* tbx.c -- tabix API functions.
Copyright (C) 2009, 2010, 2012-2015, 2017-2020, 2022-2023 Genome Research Ltd.
Copyright (C) 2009, 2010, 2012-2015, 2017-2020, 2022-2023, 2025 Genome Research Ltd.
Copyright (C) 2010-2012 Broad Institute.
Author: Heng Li <[email protected]>
Expand Down Expand Up @@ -373,8 +373,7 @@ tbx_t *tbx_index(BGZF *fp, int min_shift, const tbx_conf_t *conf)
first = 1;
}
ret = get_intv(tbx, &str, &intv, 1);
if (ret < -1) goto fail; // Out of memory
if (ret < 0) continue; // Skip unparsable lines
if (ret < 0) goto fail; // Out of memory or unparsable lines
if (hts_idx_push(tbx->idx, intv.tid, intv.beg, intv.end,
bgzf_tell(fp), 1) < 0) {
goto fail;
Expand Down

0 comments on commit 243e97e

Please sign in to comment.