Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd15870

Browse files
committed
Correct a mistake in levenshtein_less_equal() multibyte character handling.
Spotted by Alexander Korotkov.Along the way, remove a misleading comment line.
1 parent57b80b4 commitdd15870

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎contrib/fuzzystrmatch/levenshtein.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*
66
* Joe Conway <mail@joeconway.com>
77
*
8-
* contrib/fuzzystrmatch/fuzzystrmatch.c
98
* Copyright (c) 2001-2010, PostgreSQL Global Development Group
109
* ALL RIGHTS RESERVED;
1110
*
@@ -378,7 +377,7 @@ levenshtein_internal(text *s, text *t,
378377
prev[start_column]=max_d+1;
379378
curr[start_column]=max_d+1;
380379
if (start_column!=0)
381-
s_data+=n!=t_bytes+1 ?pg_mblen(s_data) :1;
380+
s_data+=s_char_len!=NULL ?s_char_len[i-1] :1;
382381
start_column++;
383382
}
384383

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp