diff options
| author | Paul Eggert | 2011-09-28 13:07:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-09-28 13:07:17 -0700 |
| commit | b13f71e2dda86836dc7dea90b385b3791f8ebd01 (patch) | |
| tree | d15fcbcfb6b94693c2db439828e7daa4e07fe0fc /src/bidi.c | |
| parent | 7b09a37a895ab2d428d1ab0786aa262ef82efba2 (diff) | |
| parent | e1504b9b0b2fdcf757c29dcc65ffe8b670cc7604 (diff) | |
| download | emacs-b13f71e2dda86836dc7dea90b385b3791f8ebd01.tar.gz emacs-b13f71e2dda86836dc7dea90b385b3791f8ebd01.zip | |
Merge from trunk.
Diffstat (limited to 'src/bidi.c')
| -rw-r--r-- | src/bidi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bidi.c b/src/bidi.c index c7b3a770597..a43490f4110 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -974,6 +974,15 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 974 | ch = 0xFFFC; | 974 | ch = 0xFFFC; |
| 975 | } | 975 | } |
| 976 | disp_end_pos = compute_display_string_end (*disp_pos, string); | 976 | disp_end_pos = compute_display_string_end (*disp_pos, string); |
| 977 | if (disp_end_pos < 0) | ||
| 978 | { | ||
| 979 | /* Somebody removed the display string from the buffer | ||
| 980 | behind our back. Recover by processing this buffer | ||
| 981 | position as if no display property were present there to | ||
| 982 | begin with. */ | ||
| 983 | *disp_prop = 0; | ||
| 984 | goto normal_char; | ||
| 985 | } | ||
| 977 | *nchars = disp_end_pos - *disp_pos; | 986 | *nchars = disp_end_pos - *disp_pos; |
| 978 | if (*nchars <= 0) | 987 | if (*nchars <= 0) |
| 979 | abort (); | 988 | abort (); |
| @@ -988,6 +997,7 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 988 | } | 997 | } |
| 989 | else | 998 | else |
| 990 | { | 999 | { |
| 1000 | normal_char: | ||
| 991 | if (string->s) | 1001 | if (string->s) |
| 992 | { | 1002 | { |
| 993 | int len; | 1003 | int len; |