Skip to content

Commit

Permalink
fix bug assert(outIndex < (int)(n_events * 2))
Browse files Browse the repository at this point in the history
  • Loading branch information
hasindu2008 committed Jun 4, 2024
1 parent 9a720f0 commit b846980
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/align.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ int32_t align(AlignedPair* out_2, char* sequence, int32_t sequence_len,
while (curr_kmer_idx >= 0 && curr_event_idx >= 0) {
// emit alignment
//>>>>>>>New Repalcement begin
assert(outIndex < (int)(n_events * 2));
assert(outIndex < (int)(n_events + sequence_len));
out_2[outIndex].ref_pos = curr_kmer_idx;
out_2[outIndex].read_pos = curr_event_idx;
outIndex++;
Expand Down
2 changes: 1 addition & 1 deletion src/f5c.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ void event_single(core_t* core,db_t* db, int32_t i) {

//allocate memory for the next alignment step
db->event_align_pairs[i] = (AlignedPair*)malloc(
sizeof(AlignedPair) * db->et[i].n * 2); //todo : find a good heuristic to save memory
sizeof(AlignedPair) * (db->et[i].n + db->read_len[i]));
MALLOC_CHK(db->event_align_pairs[i]);
}
else{
Expand Down

0 comments on commit b846980

Please sign in to comment.