diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bidi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bidi.c b/src/bidi.c index 573e513469d..c2208cd12c2 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -2977,15 +2977,13 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) | |||
| 2977 | /* N1-N2/Retaining */ | 2977 | /* N1-N2/Retaining */ |
| 2978 | || type == WEAK_BN) | 2978 | || type == WEAK_BN) |
| 2979 | { | 2979 | { |
| 2980 | if (bidi_it->next_for_neutral.type != UNKNOWN_BT) | 2980 | if (bidi_it->next_for_neutral.type != UNKNOWN_BT |
| 2981 | && (bidi_it->next_for_neutral.charpos > bidi_it->charpos | ||
| 2982 | /* PDI defines an eos, so it's OK for it to serve as its | ||
| 2983 | own next_for_neutral. */ | ||
| 2984 | || (bidi_it->next_for_neutral.charpos == bidi_it->charpos | ||
| 2985 | && bidi_it->type == PDI))) | ||
| 2981 | { | 2986 | { |
| 2982 | /* Make sure the data for resolving neutrals we are | ||
| 2983 | about to use is valid. */ | ||
| 2984 | eassert (bidi_it->next_for_neutral.charpos > bidi_it->charpos | ||
| 2985 | /* PDI defines an eos, so it's OK for it to | ||
| 2986 | serve as its own next_for_neutral. */ | ||
| 2987 | || (bidi_it->next_for_neutral.charpos == bidi_it->charpos | ||
| 2988 | && bidi_it->type == PDI)); | ||
| 2989 | type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type, | 2987 | type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type, |
| 2990 | bidi_it->next_for_neutral.type, | 2988 | bidi_it->next_for_neutral.type, |
| 2991 | current_level); | 2989 | current_level); |