diff options
| author | Joakim Verona | 2013-03-06 00:04:01 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-06 00:04:01 +0100 |
| commit | 79157e99328fb1d835985dfa89fc2a2fa427d077 (patch) | |
| tree | ac0e5a6a03089e3d6352cb3311510cfac0b7d051 /src/bidi.c | |
| parent | 15cb771195328913a9c24467db7e373acb92a769 (diff) | |
| parent | 707431575aef93ac3e9923d450a6cbf18192c933 (diff) | |
| download | emacs-79157e99328fb1d835985dfa89fc2a2fa427d077.tar.gz emacs-79157e99328fb1d835985dfa89fc2a2fa427d077.zip | |
auto upstream
Diffstat (limited to 'src/bidi.c')
| -rw-r--r-- | src/bidi.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/bidi.c b/src/bidi.c index 364d7e500ba..57d154bc544 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -1353,15 +1353,19 @@ bidi_resolve_explicit_1 (struct bidi_it *bidi_it) | |||
| 1353 | : bidi_it->string.s); | 1353 | : bidi_it->string.s); |
| 1354 | 1354 | ||
| 1355 | if (bidi_it->charpos < 0) | 1355 | if (bidi_it->charpos < 0) |
| 1356 | bidi_it->charpos = 0; | 1356 | bidi_it->charpos = bidi_it->bytepos = 0; |
| 1357 | bidi_it->bytepos = bidi_count_bytes (p, 0, 0, bidi_it->charpos, | 1357 | eassert (bidi_it->bytepos == bidi_count_bytes (p, 0, 0, |
| 1358 | bidi_it->string.unibyte); | 1358 | bidi_it->charpos, |
| 1359 | bidi_it->string.unibyte)); | ||
| 1359 | } | 1360 | } |
| 1360 | else | 1361 | else |
| 1361 | { | 1362 | { |
| 1362 | if (bidi_it->charpos < BEGV) | 1363 | if (bidi_it->charpos < BEGV) |
| 1363 | bidi_it->charpos = BEGV; | 1364 | { |
| 1364 | bidi_it->bytepos = CHAR_TO_BYTE (bidi_it->charpos); | 1365 | bidi_it->charpos = BEGV; |
| 1366 | bidi_it->bytepos = BEGV_BYTE; | ||
| 1367 | } | ||
| 1368 | eassert (bidi_it->bytepos == CHAR_TO_BYTE (bidi_it->charpos)); | ||
| 1365 | } | 1369 | } |
| 1366 | } | 1370 | } |
| 1367 | /* Don't move at end of buffer/string. */ | 1371 | /* Don't move at end of buffer/string. */ |