aboutsummaryrefslogtreecommitdiffstats
path: root/src/bidi.c
diff options
context:
space:
mode:
authorAlan Mackenzie2022-01-22 11:02:50 +0000
committerAlan Mackenzie2022-01-22 11:02:50 +0000
commit14d64a8adcc866deecd758b898e8ef2d836b354a (patch)
tree83cff9669e266f8e283ccb8cd7518e909240f1e1 /src/bidi.c
parentbdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (diff)
parentebe334cdc234de2897263aed4c05ac7088c11857 (diff)
downloademacs-scratch/correct-warning-pos.tar.gz
emacs-scratch/correct-warning-pos.zip
Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-pos
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bidi.c b/src/bidi.c
index c5d524f0493..d6ed607f14c 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -3569,7 +3569,9 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
3569ptrdiff_t 3569ptrdiff_t
3570bidi_find_first_overridden (struct bidi_it *bidi_it) 3570bidi_find_first_overridden (struct bidi_it *bidi_it)
3571{ 3571{
3572 ptrdiff_t found_pos = ZV; 3572 ptrdiff_t eob
3573 = STRINGP (bidi_it->string.lstring) ? bidi_it->string.schars : ZV;
3574 ptrdiff_t found_pos = eob;
3573 /* Maximum bidi levels we allow for L2R and R2L characters. Note 3575 /* Maximum bidi levels we allow for L2R and R2L characters. Note
3574 that these are levels after resolving explicit embeddings, 3576 that these are levels after resolving explicit embeddings,
3575 overrides, and isolates, i.e. before resolving implicit levels. */ 3577 overrides, and isolates, i.e. before resolving implicit levels. */
@@ -3607,8 +3609,8 @@ bidi_find_first_overridden (struct bidi_it *bidi_it)
3607 || ((category == WEAK || bidi_it->orig_type == NEUTRAL_ON) 3609 || ((category == WEAK || bidi_it->orig_type == NEUTRAL_ON)
3608 && level > max_weak)) 3610 && level > max_weak))
3609 found_pos = bidi_it->charpos; 3611 found_pos = bidi_it->charpos;
3610 } while (found_pos == ZV 3612 } while (found_pos == eob
3611 && bidi_it->charpos < ZV 3613 && bidi_it->charpos < eob
3612 && bidi_it->ch != BIDI_EOB 3614 && bidi_it->ch != BIDI_EOB
3613 && bidi_it->ch != '\n'); 3615 && bidi_it->ch != '\n');
3614 3616