summaryrefslogtreecommitdiff
path: root/src/bidi.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-10-04 15:09:46 +0300
committerEli Zaretskii <eliz@gnu.org>2014-10-04 15:09:46 +0300
commit16f54832c0ddd0cc553d4231d95778ed91ed5218 (patch)
tree2ee0c26e52ce00ac9adb31bd1e7c45e1f097dafe /src/bidi.c
parent6382f0a1d64caa4a688b6a264a4693ffe93c63ca (diff)
downloademacs-16f54832c0ddd0cc553d4231d95778ed91ed5218.tar.gz
Fixed a crash in 'C-x =' and in RLE followed by PDF; fixed 'C-x =' display.
Diffstat (limited to 'src/bidi.c')
-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)
}
else
{
- /* LRI, RLI, and FSI increment, and PDF decrements, the
- embedding level of the _following_ characters, so we must
- first look at the type of the previous character to support
- that. */
+ /* LRI, RLI, and FSI increment, and PDF decrements, the
+ embedding level of the _following_ characters, so we must
+ first look at the type of the previous character to support
+ that. */
switch (prev_type)
{
case RLI: /* X5a */
@@ -2518,7 +2518,7 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
{
int bob = ((bidi_it->string.s || STRINGP (bidi_it->string.lstring))
? 0 : 1);
- bidi_type_t prev_type = bidi_it->prev.type;
+ bidi_type_t prev_type = bidi_it->type;
bidi_type_t type_for_neutral = bidi_it->next_for_neutral.type;
ptrdiff_t pos_for_neutral = bidi_it->next_for_neutral.charpos;
@@ -2553,7 +2553,10 @@ bidi_level_of_next_char (struct bidi_it *bidi_it)
&& bidi_explicit_dir_char (bidi_it->ch)
&& type_for_neutral != UNKNOWN_BT
&& bidi_it->charpos < pos_for_neutral)
- type = prev_type;
+ {
+ type = prev_type;
+ eassert (type != UNKNOWN_BT);
+ }
}
else
type = UNKNOWN_BT;