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!",
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!",
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);