Skip to content

Commit 84a8f15

Browse files
committed
update
1 parent ddb17ba commit 84a8f15

File tree

6 files changed

+241
-452
lines changed

6 files changed

+241
-452
lines changed

include/bio/format/sam_input_handler.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ class format_input_handler<sam> : public format_input_handler_base<format_input_
190190

191191
ptr = res.ptr + 1; // skip cigar operation character
192192

193-
cigar_vector.emplace_back(cigar_count, seqan3::cigar::operation{}.assign_char(*res.ptr));
193+
cigar_vector.emplace_back(cigar_count,
194+
seqan3::assign_char_strictly_to(*res.ptr, seqan3::cigar::operation{}));
194195
}
195196
}
196197
}

include/bio/map_io/header.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,9 @@ void header::read(std::string_view header_string)
414414
{
415415
sequence_length_was_present = true;
416416
++it; // skip :
417-
std::from_chars(&(*it), &(header_string.back()), get<0>(info));
417+
auto res = std::from_chars(&(*it), &(header_string.back()), get<0>(info));
418+
if (res.ec != std::errc{})
419+
throw format_error{"LN tag could not be parsed correctly."};
418420
skip_until(seqan3::is_char<'\t'> || seqan3::is_char<'\n'>);
419421
break;
420422
}

include/bio/map_io/sam_tag_dictionary.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ class sam_tag_dictionary : public std::map<uint16_t, detail::sam_tag_variant>
421421
}
422422
case 'Z' : // string
423423
{
424-
(*this)[tag] = std::string{tag_value.data()};
424+
(*this)[tag] = std::string(tag_value.begin(), tag_value.end());
425425
break;
426426
}
427427
case 'H' :

0 commit comments

Comments
 (0)