X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=tabix.git;a=blobdiff_plain;f=index.c;h=80b863d3f84d53ea4c8eafb612db56150c94870a;hp=cc564981ee5696f0d3350298312287c516946f85;hb=e6ba78ac1e0c41c4256dd385895352236d80426a;hpb=bc08e6c2f34c1367d0fe75dd19cedccfab881229 diff --git a/index.c b/index.c index cc56498..80b863d 100644 --- a/index.c +++ b/index.c @@ -159,8 +159,8 @@ static int get_intv(ti_index_t *idx, kstring_t *str, ti_intv_t *intv) if (i != str->l) str->s[i] = '\t'; } else if (id == idx->conf.bc) { // here ->beg is 1-based. it will be changed to 0-based at the end of this routine. - intv->beg = strtol(str->s + b, &s, 0); - if (idx->conf.preset&TI_FLAG_UCSC) ++intv->beg; + intv->beg = intv->end = strtol(str->s + b, &s, 0); + if (!(idx->conf.preset&TI_FLAG_UCSC)) --intv->beg; } else { if ((idx->conf.preset&0xffff) == TI_PRESET_GENERIC) { if (id == idx->conf.ec) intv->end = strtol(str->s + b, &s, 0);