summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-13 12:44:14 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-13 12:44:14 +0100
commit85eead9d1fbebd84fa25046970f73fcb9a127e50 (patch)
tree10a785eec4f288f63557f5f59036837e9f07f803 /src/libutil
parent766af6da323a191f34e6b66edadf2032d2aac1a1 (diff)
downloadrspamd-85eead9d1fbebd84fa25046970f73fcb9a127e50.tar.gz
rspamd-85eead9d1fbebd84fa25046970f73fcb9a127e50.zip
[Fix] Fix lowercasing of stemmed words
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/str_util.c5
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);
}