Skip to content

Commit 0f896af

Browse files
src/bam_record_utils.hpp: fixing the use of bool values in less-than comparison
1 parent 7c9f9c7 commit 0f896af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bam_record_utils.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ inline bool
250250
precedes_by_end_and_strand(const bamxx::bam_rec &a, const bamxx::bam_rec &b) {
251251
const auto end_a = bam_endpos(a.b);
252252
const auto end_b = bam_endpos(b.b);
253-
return end_a < end_b || (end_a == end_b && bam_is_rev(a) < bam_is_rev(b));
253+
return end_a < end_b ||
254+
(end_a == end_b && bam_is_rev(a) == false && bam_is_rev(b) == true);
254255
}
255256

256257
inline bool

0 commit comments

Comments
 (0)