Skip to content

Commit 243e97e

Browse files
vasudeva8whitwham
authored andcommitted
exits with return value 1 on tabix parse error
1 parent 1682e5e commit 243e97e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tbx.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* tbx.c -- tabix API functions.
22
3-
Copyright (C) 2009, 2010, 2012-2015, 2017-2020, 2022-2023 Genome Research Ltd.
3+
Copyright (C) 2009, 2010, 2012-2015, 2017-2020, 2022-2023, 2025 Genome Research Ltd.
44
Copyright (C) 2010-2012 Broad Institute.
55
66
Author: Heng Li <[email protected]>
@@ -373,8 +373,7 @@ tbx_t *tbx_index(BGZF *fp, int min_shift, const tbx_conf_t *conf)
373373
first = 1;
374374
}
375375
ret = get_intv(tbx, &str, &intv, 1);
376-
if (ret < -1) goto fail; // Out of memory
377-
if (ret < 0) continue; // Skip unparsable lines
376+
if (ret < 0) goto fail; // Out of memory or unparsable lines
378377
if (hts_idx_push(tbx->idx, intv.tid, intv.beg, intv.end,
379378
bgzf_tell(fp), 1) < 0) {
380379
goto fail;

0 commit comments

Comments
 (0)