(byte_char_debug_check): Call multibyte_chars_in_text
instead of chars_in_text because we must ignore enable-multibyte-characters here.
This commit is contained in:
parent
88ab3cc133
commit
bab9ce2f56
1 changed files with 6 additions and 5 deletions
|
@ -105,13 +105,14 @@ byte_char_debug_check (b, charpos, bytepos)
|
|||
|
||||
if (bytepos > BUF_GPT_BYTE (b))
|
||||
{
|
||||
nchars = chars_in_text (BUF_BEG_ADDR (b),
|
||||
nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b),
|
||||
BUF_GPT_BYTE (b) - BUF_BEG_BYTE (b));
|
||||
nchars += chars_in_text (BUF_GAP_END_ADDR (b),
|
||||
nchars += multibyte_chars_in_text (BUF_GAP_END_ADDR (b),
|
||||
bytepos - BUF_GPT_BYTE (b));
|
||||
}
|
||||
else
|
||||
nchars = chars_in_text (BUF_BEG_ADDR (b), bytepos - BUF_BEG_BYTE (b));
|
||||
nchars = multibyte_chars_in_text (BUF_BEG_ADDR (b),
|
||||
bytepos - BUF_BEG_BYTE (b));
|
||||
|
||||
if (charpos - 1 != nchars)
|
||||
abort ();
|
||||
|
|
Loading…
Add table
Reference in a new issue