diff options
author | Rocky Madden <git@rockymadden.com> | 2012-10-07 00:21:32 -0600 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2012-10-07 00:21:32 -0600 |
commit | 8ef62dbc17972dba81678302fd6952c3e8e10f0f (patch) | |
tree | 309f17b56296b93a52d618393cf8e77ed6488264 /core/source | |
parent | ae5ad89f49828464605022a04381662ed9a84373 (diff) | |
download | stringmetric-8ef62dbc17972dba81678302fd6952c3e8e10f0f.tar.gz stringmetric-8ef62dbc17972dba81678302fd6952c3e8e10f0f.tar.bz2 stringmetric-8ef62dbc17972dba81678302fd6952c3e8e10f0f.zip |
Fixed bug where outermost loop was not broken when start variable was greater than the 0 based array index.
Diffstat (limited to 'core/source')
-rwxr-xr-x | core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala b/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala index 4311379..77f0a31 100755 --- a/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala +++ b/core/source/core/scala/org/hashtree/stringmetric/JaroWinklerMetric.scala @@ -44,7 +44,7 @@ object JaroWinklerMetric extends StringMetric { val start = if (i - window <= 0) 0 else i - window val end = if (i + window >= ca2.length - 1) ca2.length - 1 else i + window - if (start > ca2.length) break + if (start > ca2.length - 1) break breakable { for (ii <- start to end if ! a2Indices.contains(ii)) { |