diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-02 14:10:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-02 14:26:34 +0100 |
commit | cfc1e965d51ed2fc2c6462e979094e47e47ba2f4 (patch) | |
tree | ea629021305e128269ca072c7e6cd387846dd3b0 /src/libstat/tokenizers | |
parent | 2c0c7937ec6cf30e17e8e418939a8cba3cce7714 (diff) | |
download | rspamd-cfc1e965d51ed2fc2c6462e979094e47e47ba2f4.tar.gz rspamd-cfc1e965d51ed2fc2c6462e979094e47e47ba2f4.zip |
Fix tokenization of the last token in a message.
Diffstat (limited to 'src/libstat/tokenizers')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstat/tokenizers/tokenizers.c b/src/libstat/tokenizers/tokenizers.c index eebc57c22..4b8f0cfb3 100644 --- a/src/libstat/tokenizers/tokenizers.c +++ b/src/libstat/tokenizers/tokenizers.c @@ -295,7 +295,7 @@ rspamd_tokenize_text (gchar *text, gsize len, gboolean is_utf, res = g_array_sized_new (FALSE, FALSE, sizeof (rspamd_fstring_t), 128); while (func (&buf, &pos, &token, &cur, is_utf, &l)) { - if (min_len > 0 && l < min_len) { + if (l == 0 || (min_len > 0 && l < min_len)) { token.begin = pos; continue; } |