Skip to content

Commit

Permalink
fix: deal with zero length blocks getting added to segment
Browse files Browse the repository at this point in the history
  • Loading branch information
nnoll committed Mar 18, 2022
1 parent 36f72d5 commit f6c39c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/block.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,19 @@ function partition(alignment; minblock=500)

# ----------------------------
# internal operators

function finalize_block!()
length(segment) == 0 && @goto advance

push!(block, (
range = (
qry = Pos(qry.start,qry.stop-1),
ref = Pos(ref.start,ref.stop-1)
qry = (qry.stop-1 qry.start) ? Pos(qry.start,qry.stop-1) : nothing,
ref = (ref.stop-1 ref.start) ? Pos(ref.start,ref.stop-1) : nothing,
),
segment = segment
))

segment = PosPair[]

@label advance
advance!(qry)
advance!(ref)
Expand Down

0 comments on commit f6c39c3

Please sign in to comment.