Skip to content

Commit

Permalink
Merge pull request #144 from smithlabcode/sam_realloc
Browse files Browse the repository at this point in the history
fixed the order of source and dest in sam_realloc as per the original…
  • Loading branch information
andrewdavidsmith authored Sep 21, 2023
2 parents 6e9eac5 + 97545b9 commit 96dc147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/bam_record_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ sam_realloc_bam_data(bam1_t *b, size_t desired) {
new_data = static_cast<uint8_t *>(malloc(new_m_data));
if (new_data != nullptr) {
if (b->l_data > 0)
std::copy_n(new_data,
std::copy_n(b->data,
(static_cast<uint32_t>(b->l_data) < b->m_data) ? b->l_data
: b->m_data,
b->data);
new_data);
bam_set_mempolicy(b, bam_get_mempolicy(b) & (~BAM_USER_OWNS_DATA));
}
}
Expand Down

0 comments on commit 96dc147

Please sign in to comment.