]> granicus.if.org Git - postgresql/commitdiff
Fix word's length in pg_regexec call
authorTeodor Sigaev <teodor@sigaev.ru>
Wed, 21 Dec 2005 13:07:38 +0000 (13:07 +0000)
committerTeodor Sigaev <teodor@sigaev.ru>
Wed, 21 Dec 2005 13:07:38 +0000 (13:07 +0000)
contrib/tsearch2/ispell/spell.c

index 9999983cc83632dcf9de0e9ce743d54974f921c5..7fb720f582cc76dd56e5d53c5986cba91ca0bb5d 100644 (file)
@@ -819,7 +819,7 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
                data = (pg_wchar *) palloc((dat_len + 1) * sizeof(pg_wchar));
                data_len = pg_mb2wchar_with_len(newword, data, dat_len);
 
-               if (!(err = pg_regexec(&(Affix->reg.regex), data, dat_len, 0, NULL, 1, subs, 0)))
+               if (!(err = pg_regexec(&(Affix->reg.regex), data, data_len, 0, NULL, 1, subs, 0)))
                {
                        pfree(data);
                        return newword;