Skip to content

Commit e5934e0

Browse files
Merge pull request #208 from smithlabcode/debug-amrfinder
Debug amrfinder
2 parents d4cb2ca + 3c91ca7 commit e5934e0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/amrfinder/amrfinder.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ process_chrom(const bool verbose, const uint32_t n_threads,
330330

331331
const auto n_blocks = n_threads*blocks_per_thread;
332332

333-
const size_t lim = n_cpgs - window_size + 1;
333+
const size_t lim = (n_cpgs >= window_size) ?
334+
n_cpgs - window_size + 1 : 0;
335+
;
334336
const auto blocks = get_block_bounds(static_cast<size_t>(0),
335337
lim, lim/n_blocks);
336338

0 commit comments

Comments
 (0)