Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sam.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,8 @@ static bam_hdr_t *sam_hdr_sanitise(bam_hdr_t *h) {
if (last == '\n') {
lnum++;
if (cp[i] != '@') {
hts_log_error("Malformed SAM header at line %u", lnum);
uint32_t offset = i < 300 ? 0 : (i - 300);
hts_log_error("Malformed SAM header: unexpected newline character at line %u in ... %s", lnum , cp + offset);
bam_hdr_destroy(h);
return NULL;
}
Expand Down