Skip to content

Commit 087bd17

Browse files
committed
Minor logic fix for new levenshtein implementation.
Alexander Korotkov
1 parent 7c5d0ae commit 087bd17

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/fuzzystrmatch/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ top_builddir = ../..
1616
include $(top_builddir)/src/Makefile.global
1717
include $(top_srcdir)/contrib/contrib-global.mk
1818
endif
19+
20+
# levenshtein.c is #included by fuzzystrmatch.c
21+
fuzzystrmatch.o: fuzzystrmatch.c levenshtein.c

contrib/fuzzystrmatch/levenshtein.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ levenshtein_internal(text *s, text *t,
377377
prev[start_column] = max_d + 1;
378378
curr[start_column] = max_d + 1;
379379
if (start_column != 0)
380-
s_data += s_char_len != NULL ? s_char_len[i - 1] : 1;
380+
s_data += (s_char_len != NULL) ? s_char_len[start_column - 1] : 1;
381381
start_column++;
382382
}
383383

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy