[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99923: Fix a crash when an NSM chara
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99923: Fix a crash when an NSM character is inserted at BEGV. |
Date: |
Sat, 17 Apr 2010 16:34:23 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99923
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2010-04-17 16:34:23 +0300
message:
Fix a crash when an NSM character is inserted at BEGV.
bidi.c (bidi_init_it): Fix initialization of bidi_it->prev.
(bidi_resolve_weak): Don't use prev.type_after_w1 if it is
NEUTRAL_B or UNKNOWN_BT.
modified:
src/ChangeLog
src/bidi.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-04-16 20:37:59 +0000
+++ b/src/ChangeLog 2010-04-17 13:34:23 +0000
@@ -1,3 +1,11 @@
+2010-04-17 Eli Zaretskii <address@hidden>
+
+ Fix a crash when an NSM character is inserted at BEGV.
+
+ * bidi.c (bidi_init_it): Fix initialization of bidi_it->prev.
+ (bidi_resolve_weak): Don't use prev.type_after_w1 if it is
+ NEUTRAL_B or UNKNOWN_BT.
+
2010-04-16 Eli Zaretskii <address@hidden>
* xdisp.c (set_cursor_from_row): Don't consider possibility of
=== modified file 'src/bidi.c'
--- a/src/bidi.c 2010-04-08 17:35:10 +0000
+++ b/src/bidi.c 2010-04-17 13:34:23 +0000
@@ -976,10 +976,11 @@
bidi_it->new_paragraph = 1;
bidi_it->separator_limit = -1;
bidi_it->type = NEUTRAL_B;
- bidi_it->type_after_w1 = UNKNOWN_BT;
- bidi_it->orig_type = UNKNOWN_BT;
+ bidi_it->type_after_w1 = NEUTRAL_B;
+ bidi_it->orig_type = NEUTRAL_B;
bidi_it->prev_was_pdf = 0;
- bidi_it->prev.type = bidi_it->prev.type_after_w1 = UNKNOWN_BT;
+ bidi_it->prev.type = bidi_it->prev.type_after_w1 =
+ bidi_it->prev.orig_type = UNKNOWN_BT;
bidi_it->last_strong.type = bidi_it->last_strong.type_after_w1 =
bidi_it->last_strong.orig_type = UNKNOWN_BT;
bidi_it->next_for_neutral.charpos = -1;
@@ -1353,7 +1354,9 @@
current level run, and thus not relevant to this NSM.
This is why NSM gets the type_after_w1 of the previous
character. */
- if (bidi_it->prev.type != UNKNOWN_BT)
+ if (bidi_it->prev.type_after_w1 != UNKNOWN_BT
+ /* if type_after_w1 is NEUTRAL_B, this NSM is at sor */
+ && bidi_it->prev.type_after_w1 != NEUTRAL_B)
type = bidi_it->prev.type_after_w1;
else if (bidi_it->sor == R2L)
type = STRONG_R;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99923: Fix a crash when an NSM character is inserted at BEGV.,
Eli Zaretskii <=