diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-25 13:56:44 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-25 13:56:44 +0100 |
commit | 88a9165a5a1af590c949912efbb8b930cff4bdbe (patch) | |
tree | 26e29501800621cca9d96430e8cc66fb6b261ee9 /src/libstat/tokenizers | |
parent | 052323f56f5dad1ccbb2e819983b532d0cd7db34 (diff) | |
download | rspamd-88a9165a5a1af590c949912efbb8b930cff4bdbe.tar.gz rspamd-88a9165a5a1af590c949912efbb8b930cff4bdbe.zip |
[Minor] Oops, check for UBRK_DONE first
Diffstat (limited to 'src/libstat/tokenizers')
-rw-r--r-- | src/libstat/tokenizers/tokenizers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstat/tokenizers/tokenizers.c b/src/libstat/tokenizers/tokenizers.c index c533534ed..77a924f41 100644 --- a/src/libstat/tokenizers/tokenizers.c +++ b/src/libstat/tokenizers/tokenizers.c @@ -426,7 +426,7 @@ start_over: gint32 old_p = p; p = ubrk_next (bi); - if (p <= old_p) { + if (p != UBRK_DONE && p <= old_p) { msg_warn_pool_check ( "tokenization reversed back on position %d," "%d new position (%d backward), likely libicu bug!", @@ -465,7 +465,7 @@ start_over: while (last > p && p != UBRK_DONE) { gint32 old_p = p; p = ubrk_next (bi); - if (p <= old_p) { + if (p != UBRK_DONE && p <= old_p) { msg_warn_pool_check ( "tokenization reversed back on position %d," "%d new position (%d backward), likely libicu bug!", @@ -567,7 +567,7 @@ start_over: last = p; p = ubrk_next (bi); - if (p <= last) { + if (p != UBRK_DONE && p <= last) { msg_warn_pool_check ("tokenization reversed back on position %d," "%d new position (%d backward), likely libicu bug!", (gint)(p), (gint)(last), last - p); |