Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Jan 11, 2023
1 parent 71c45f5 commit 60e4f8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/demux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,11 @@ where

if !self.skip_read_name_check {
let first_head = zipped_reads[0].head();
let end_index = zipped_reads[0].head().find_byte(b':').unwrap_or(first_head.len());
let end_index = zipped_reads[0].head().find_byte(b' ').unwrap_or(first_head.len());
for read in zipped_reads.iter().dropping(1) {
let cur_head = read.head();
let ok = cur_head.len() == end_index
|| (cur_head.len() > end_index && cur_head[end_index] == b':');
|| (cur_head.len() > end_index && cur_head[end_index] == b' ');
let ok = ok && first_head[0..end_index] == cur_head[0..end_index];
ensure!(
ok,
Expand Down

0 comments on commit 60e4f8a

Please sign in to comment.