[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 d184773c2e: Avoid assertion violations in 'bidi_resolve_bracket
From: |
Eli Zaretskii |
Subject: |
emacs-28 d184773c2e: Avoid assertion violations in 'bidi_resolve_brackets' |
Date: |
Tue, 8 Mar 2022 08:37:37 -0500 (EST) |
branch: emacs-28
commit d184773c2e2a69bea9b96190c83727b4e7a16542
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Avoid assertion violations in 'bidi_resolve_brackets'
* src/bidi.c (bidi_resolve_brackets): Move assertion to where it
really matters. (Bug#54295)
---
src/bidi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/bidi.c b/src/bidi.c
index a548960048..9449e09944 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -2921,13 +2921,13 @@ bidi_resolve_brackets (struct bidi_it *bidi_it)
int embedding_level = bidi_it->level_stack[bidi_it->stack_idx].level;
bidi_type_t embedding_type = (embedding_level & 1) ? STRONG_R : STRONG_L;
- eassert (bidi_it->prev_for_neutral.type != UNKNOWN_BT);
eassert (bidi_it->bracket_pairing_pos > bidi_it->charpos);
if (bidi_it->bracket_enclosed_type == embedding_type) /* N0b */
type = embedding_type;
else if (bidi_it->bracket_enclosed_type == STRONG_L /* N0c, N0d */
|| bidi_it->bracket_enclosed_type == STRONG_R)
{
+ eassert (bidi_it->prev_for_neutral.type != UNKNOWN_BT);
switch (bidi_it->prev_for_neutral.type)
{
case STRONG_R:
@@ -2946,7 +2946,6 @@ bidi_resolve_brackets (struct bidi_it *bidi_it)
break;
default:
/* N0d: Do not set the type for that bracket pair. */
- /* (Actuallly, this shouldn't happen.) */
break;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 d184773c2e: Avoid assertion violations in 'bidi_resolve_brackets',
Eli Zaretskii <=