From f9d0ac00aa93947b35f10a6d62772496a6fc00d3 Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Fri, 13 Oct 2017 18:55:30 +0200 Subject: [PATCH] ALignment: fixed a bug where a similarity threshold of 100% would generate memory bugs --- liblcs/sse_banded_LCS_alignment.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liblcs/sse_banded_LCS_alignment.c b/liblcs/sse_banded_LCS_alignment.c index 425c6f7..c254aea 100644 --- a/liblcs/sse_banded_LCS_alignment.c +++ b/liblcs/sse_banded_LCS_alignment.c @@ -458,6 +458,9 @@ int calculateSizeToAllocate(int maxLen, int minLen, int LCSmin) calculateBandLengths(maxLen, minLen, ¬Used, &size, LCSmin); // max size = max left band length * 2 + if (!size) // Happens if there is no threshold (threshold is 100% similarity) and generates bugs if left to 0 + size = 1; + //fprintf(stderr, "\nsize for address before %8 = %d", size); size*= 2;