diff options
| author | Eli Zaretskii | 2019-03-04 19:22:23 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2019-03-04 19:22:23 +0200 |
| commit | f06405cbf8dde232f8cbe9564a42613dae3dfdc5 (patch) | |
| tree | af924340899b195d2b179e76ec8514383b97ce45 | |
| parent | 6a1dcf594a8b6aa72820f04b529aa3454cf3fc61 (diff) | |
| download | emacs-f06405cbf8dde232f8cbe9564a42613dae3dfdc5.tar.gz emacs-f06405cbf8dde232f8cbe9564a42613dae3dfdc5.zip | |
Avoid assertion violations in buf_bytepos_to_charpos
* src/marker.c (buf_bytepos_to_charpos): Disable the assertion
regarding bytepos always at the head byte of a multibyte
sequence.
| -rw-r--r-- | src/marker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/marker.c b/src/marker.c index 0b2e1bf5c6b..6755993bfac 100644 --- a/src/marker.c +++ b/src/marker.c | |||
| @@ -332,9 +332,11 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t bytepos) | |||
| 332 | if (best_above == best_above_byte) | 332 | if (best_above == best_above_byte) |
| 333 | return bytepos; | 333 | return bytepos; |
| 334 | 334 | ||
| 335 | #if 0 | ||
| 335 | /* Check bytepos is not in the middle of a character. */ | 336 | /* Check bytepos is not in the middle of a character. */ |
| 336 | eassert (bytepos >= BUF_Z_BYTE (b) | 337 | eassert (bytepos >= BUF_Z_BYTE (b) |
| 337 | || CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos))); | 338 | || CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos))); |
| 339 | #endif | ||
| 338 | 340 | ||
| 339 | best_below = BEG; | 341 | best_below = BEG; |
| 340 | best_below_byte = BEG_BYTE; | 342 | best_below_byte = BEG_BYTE; |