emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f06405c: Avoid assertion violations in buf_bytepos_


From: Eli Zaretskii
Subject: [Emacs-diffs] master f06405c: Avoid assertion violations in buf_bytepos_to_charpos
Date: Mon, 4 Mar 2019 12:23:14 -0500 (EST)

branch: master
commit f06405cbf8dde232f8cbe9564a42613dae3dfdc5
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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.
---
 src/marker.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/marker.c b/src/marker.c
index 0b2e1bf..6755993 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -332,9 +332,11 @@ buf_bytepos_to_charpos (struct buffer *b, ptrdiff_t 
bytepos)
   if (best_above == best_above_byte)
     return bytepos;
 
+#if 0
   /* Check bytepos is not in the middle of a character. */
   eassert (bytepos >= BUF_Z_BYTE (b)
            || CHAR_HEAD_P (BUF_FETCH_BYTE (b, bytepos)));
+#endif
 
   best_below = BEG;
   best_below_byte = BEG_BYTE;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]