mirror of
https://github.com/postgres/postgres.git
synced 2025-05-14 00:03:46 -04:00
Minor logic fix for new levenshtein implementation.
Alexander Korotkov
This commit is contained in:
parent
7c5d0ae707
commit
087bd179e6
@ -16,3 +16,6 @@ top_builddir = ../..
|
|||||||
include $(top_builddir)/src/Makefile.global
|
include $(top_builddir)/src/Makefile.global
|
||||||
include $(top_srcdir)/contrib/contrib-global.mk
|
include $(top_srcdir)/contrib/contrib-global.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# levenshtein.c is #included by fuzzystrmatch.c
|
||||||
|
fuzzystrmatch.o: fuzzystrmatch.c levenshtein.c
|
||||||
|
@ -377,7 +377,7 @@ levenshtein_internal(text *s, text *t,
|
|||||||
prev[start_column] = max_d + 1;
|
prev[start_column] = max_d + 1;
|
||||||
curr[start_column] = max_d + 1;
|
curr[start_column] = max_d + 1;
|
||||||
if (start_column != 0)
|
if (start_column != 0)
|
||||||
s_data += s_char_len != NULL ? s_char_len[i - 1] : 1;
|
s_data += (s_char_len != NULL) ? s_char_len[start_column - 1] : 1;
|
||||||
start_column++;
|
start_column++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user