commit 88a9165: [Minor] Oops, check for UBRK_DONE first
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Oct 25 13:00:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-10-25 13:56:44 +0100
URL: https://github.com/rspamd/rspamd/commit/88a9165a5a1af590c949912efbb8b930cff4bdbe (HEAD -> master)
[Minor] Oops, check for UBRK_DONE first
---
src/libstat/tokenizers/tokenizers.c | 6 +++---
1 file 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);
More information about the Commits
mailing list