Avoid assertion violations in nhexl-mode
* src/bidi.c (bidi_resolve_neutral): Convert an assertion to real code executed in all builds. (Bug#24001)
This commit is contained in:
parent
916abe91fd
commit
59fa4c39f4
1 changed files with 6 additions and 8 deletions
14
src/bidi.c
14
src/bidi.c
|
@ -2977,15 +2977,13 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
|
||||||
/* N1-N2/Retaining */
|
/* N1-N2/Retaining */
|
||||||
|| type == WEAK_BN)
|
|| type == WEAK_BN)
|
||||||
{
|
{
|
||||||
if (bidi_it->next_for_neutral.type != UNKNOWN_BT)
|
if (bidi_it->next_for_neutral.type != UNKNOWN_BT
|
||||||
|
&& (bidi_it->next_for_neutral.charpos > bidi_it->charpos
|
||||||
|
/* PDI defines an eos, so it's OK for it to serve as its
|
||||||
|
own next_for_neutral. */
|
||||||
|
|| (bidi_it->next_for_neutral.charpos == bidi_it->charpos
|
||||||
|
&& bidi_it->type == PDI)))
|
||||||
{
|
{
|
||||||
/* Make sure the data for resolving neutrals we are
|
|
||||||
about to use is valid. */
|
|
||||||
eassert (bidi_it->next_for_neutral.charpos > bidi_it->charpos
|
|
||||||
/* PDI defines an eos, so it's OK for it to
|
|
||||||
serve as its own next_for_neutral. */
|
|
||||||
|| (bidi_it->next_for_neutral.charpos == bidi_it->charpos
|
|
||||||
&& bidi_it->type == PDI));
|
|
||||||
type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
|
type = bidi_resolve_neutral_1 (bidi_it->prev_for_neutral.type,
|
||||||
bidi_it->next_for_neutral.type,
|
bidi_it->next_for_neutral.type,
|
||||||
current_level);
|
current_level);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue