diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-05 18:25:05 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-05 18:25:05 +0400 |
commit | 9f7f743f9e4c5ee9755d8c4cd757b151daa15954 (patch) | |
tree | 586931ba348a68c226159481c2e80f0ac24126f7 /src/plugins/chartable.c | |
parent | 52e71f9ed43b0e0f7f030eb0f0b56a887978cf8a (diff) | |
download | rspamd-9f7f743f9e4c5ee9755d8c4cd757b151daa15954.tar.gz rspamd-9f7f743f9e4c5ee9755d8c4cd757b151daa15954.zip |
* Fix chartable module in utf mode
Diffstat (limited to 'src/plugins/chartable.c')
-rw-r--r-- | src/plugins/chartable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c index e5b5893fb..785cd3a59 100644 --- a/src/plugins/chartable.c +++ b/src/plugins/chartable.c @@ -135,7 +135,7 @@ check_part (struct mime_text_part *part, gboolean raw_mode) else { while (remain > 0) { c = g_utf8_get_char_validated (p, remain); - if (c == (gunichar) - 2 || c == (gunichar) - 1) { + if (c == (gunichar) -2 || c == (gunichar) -1) { /* Invalid characters detected, stop processing */ return FALSE; } @@ -147,12 +147,12 @@ check_part (struct mime_text_part *part, gboolean raw_mode) if (remain > 0) { t = g_utf8_get_char_validated (p, remain); - if (c == (gunichar) - 2 || c == (gunichar) - 1) { + if (t == (gunichar) -2 || t == (gunichar) -1) { /* Invalid characters detected, stop processing */ return FALSE; } sct = g_unichar_get_script (t); - if (g_unichar_isalnum (c) && g_unichar_isalnum (t)) { + if (g_unichar_isalpha (c) && g_unichar_isalpha (t)) { /* We have two unicode alphanumeric characters, so we can check its script */ if (sct != scc) { mark++; |