From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> I looked at the code and it looks to me like there is a very obvious b= ug
>=C2=A0 in function buffer_chars_equal in editfns.c. It calls
>=C2=A0 BUF_FETCH_CHAR_AS_MULTIBYTE passing *character* positions, but t= he
>=C2=A0 macro expects *byte* positions. (it would be nice if these char = vs byte
>=C2=A0 positions could be distinguished with types, but I'm not sur= e it is
>=C2=A0 possible in C).
>
> The simple fix is to replace BUF_FETCH_CHAR_AS_MULTIBYTE with
>=C2=A0 STRING_CHAR (BUF_CHAR_ADDRESS (buf, pos)) and this seems to work= .
Thanks, I installed a slightly different fix on the emacs-26 branch,
perhaps you could try that.