diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-13 12:44:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-13 12:44:14 +0100 |
commit | 85eead9d1fbebd84fa25046970f73fcb9a127e50 (patch) | |
tree | 10a785eec4f288f63557f5f59036837e9f07f803 /src/libutil | |
parent | 766af6da323a191f34e6b66edadf2032d2aac1a1 (diff) | |
download | rspamd-85eead9d1fbebd84fa25046970f73fcb9a127e50.tar.gz rspamd-85eead9d1fbebd84fa25046970f73fcb9a127e50.zip |
[Fix] Fix lowercasing of stemmed words
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/str_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index e1f0d5369..004204881 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -147,14 +147,15 @@ rspamd_str_lc_utf8 (gchar *str, guint size) gunichar uc; while (remain > 0) { - uc = g_utf8_get_char (s); - uc = g_unichar_tolower (uc); p = g_utf8_next_char (s); if (p - s > remain) { break; } + uc = g_utf8_get_char (s); + uc = g_unichar_tolower (uc); + if (remain >= 6) { r = g_unichar_to_utf8 (uc, d); } |