aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bidi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bidi.c b/src/bidi.c
index aad867887b1..eee2a9c623b 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1763,10 +1763,10 @@ bidi_resolve_explicit (struct bidi_it *bidi_it)
1763 } 1763 }
1764 else 1764 else
1765 { 1765 {
1766 /* LRI, RLI, and FSI increment, and PDF decrements, the 1766 /* LRI, RLI, and FSI increment, and PDF decrements, the
1767 embedding level of the _following_ characters, so we must 1767 embedding level of the _following_ characters, so we must
1768 first look at the type of the previous character to support 1768 first look at the type of the previous character to support
1769 that. */ 1769 that. */
1770 switch (prev_type) 1770 switch (prev_type)
1771 { 1771 {
1772 case RLI: /* X5a */ 1772 case RLI: /* X5a */
@@ -2518,7 +2518,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
2518 { 2518 {
2519 int bob = ((bidi_it->string.s || STRINGP (bidi_it->string.lstring)) 2519 int bob = ((bidi_it->string.s || STRINGP (bidi_it->string.lstring))
2520 ? 0 : 1); 2520 ? 0 : 1);
2521 bidi_type_t prev_type = bidi_it->prev.type; 2521 bidi_type_t prev_type = bidi_it->type;
2522 bidi_type_t type_for_neutral = bidi_it->next_for_neutral.type; 2522 bidi_type_t type_for_neutral = bidi_it->next_for_neutral.type;
2523 ptrdiff_t pos_for_neutral = bidi_it->next_for_neutral.charpos; 2523 ptrdiff_t pos_for_neutral = bidi_it->next_for_neutral.charpos;
2524 2524
@@ -2553,7 +2553,10 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
2553 && bidi_explicit_dir_char (bidi_it->ch) 2553 && bidi_explicit_dir_char (bidi_it->ch)
2554 && type_for_neutral != UNKNOWN_BT 2554 && type_for_neutral != UNKNOWN_BT
2555 && bidi_it->charpos < pos_for_neutral) 2555 && bidi_it->charpos < pos_for_neutral)
2556 type = prev_type; 2556 {
2557 type = prev_type;
2558 eassert (type != UNKNOWN_BT);
2559 }
2557 } 2560 }
2558 else 2561 else
2559 type = UNKNOWN_BT; 2562 type = UNKNOWN_BT;