提交 087bd179 编写于 作者: T Tom Lane

Minor logic fix for new levenshtein implementation.

Alexander Korotkov
上级 7c5d0ae7
......@@ -16,3 +16,6 @@ top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
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;
curr[start_column] = max_d + 1;
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++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册