Skip to content

Commit

Permalink
only assign result once
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann authored and Martinsos committed Apr 19, 2023
1 parent 18794ae commit 931be2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions edlib/src/edlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,10 +889,10 @@ static int myersCalcEditDistanceNW(const Word* const Peq, const int W, const int
(*alignData)->Ps[maxNumBlocks * c + b] = bl->P;
(*alignData)->Ms[maxNumBlocks * c + b] = bl->M;
(*alignData)->scores[maxNumBlocks * c + b] = bl->score;
(*alignData)->firstBlocks[c] = firstBlock;
(*alignData)->lastBlocks[c] = lastBlock;
bl++;
}
(*alignData)->firstBlocks[c] = firstBlock;
(*alignData)->lastBlocks[c] = lastBlock;
}
//----------------------------------------------------------//
//---- If this is stop column, save it and finish ----//
Expand All @@ -901,9 +901,9 @@ static int myersCalcEditDistanceNW(const Word* const Peq, const int W, const int
(*alignData)->Ps[b] = (blocks + b)->P;
(*alignData)->Ms[b] = (blocks + b)->M;
(*alignData)->scores[b] = (blocks + b)->score;
(*alignData)->firstBlocks[0] = firstBlock;
(*alignData)->lastBlocks[0] = lastBlock;
}
(*alignData)->firstBlocks[0] = firstBlock;
(*alignData)->lastBlocks[0] = lastBlock;
*bestScore_ = -1;
*position_ = targetStopPosition;
delete[] blocks;
Expand Down

0 comments on commit 931be2b

Please sign in to comment.