Skip to content

Commit 2d99e3f

Browse files
committed
fix recursion error
1 parent 9c67d51 commit 2d99e3f

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
## Changelog
22

3-
### [1.0.1] - 2022-04-
3+
### [1.0.2] - 2022-06-11
4+
#### Fixed
5+
- fix unlimited recursion in CachedLCSseq::similarity
6+
- reduce compiler warnings
7+
8+
### [1.0.1] - 2022-04-16
49
#### Fixed
510
- fix undefined behavior in sorted_split incrementing iterator past the end
611
- fix use after free in editops calculation

extras/rapidfuzz_amalgamated.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
22
// SPDX-License-Identifier: MIT
3-
// RapidFuzz v1.0.1
4-
// Generated: 2022-06-09 23:04:10.629372
3+
// RapidFuzz v1.0.2
4+
// Generated: 2022-06-11 16:04:44.231692
55
// ----------------------------------------------------------
66
// This file is an amalgamation of multiple different files.
77
// You probably shouldn't edit it directly.
@@ -2779,7 +2779,7 @@ int64_t CachedLCSseq<CharT1>::distance(InputIt2 first2, InputIt2 last2, int64_t
27792779
{
27802780
int64_t maximum = std::max<int64_t>(s1.size(), std::distance(first2, last2));
27812781
int64_t cutoff_distance = maximum - score_cutoff;
2782-
int64_t sim = maximum - distance(first2, last2, cutoff_distance);
2782+
int64_t sim = maximum - similarity(first2, last2, cutoff_distance);
27832783
return (sim >= score_cutoff) ? sim : 0;
27842784
}
27852785

rapidfuzz/distance/LCSseq.impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ int64_t CachedLCSseq<CharT1>::distance(InputIt2 first2, InputIt2 last2, int64_t
596596
{
597597
int64_t maximum = std::max<int64_t>(s1.size(), std::distance(first2, last2));
598598
int64_t cutoff_distance = maximum - score_cutoff;
599-
int64_t sim = maximum - distance(first2, last2, cutoff_distance);
599+
int64_t sim = maximum - similarity(first2, last2, cutoff_distance);
600600
return (sim >= score_cutoff) ? sim : 0;
601601
}
602602

tools/amalgamation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import sys
88

99
root_path = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
10-
version_string = "1.0.1"
10+
version_string = "1.0.2"
1111

1212
starting_header = os.path.join(root_path, 'rapidfuzz', 'rapidfuzz_all.hpp')
1313
output_header = os.path.join(root_path, 'extras', 'rapidfuzz_amalgamated.hpp')

0 commit comments

Comments
 (0)