Eli Zaretskii schrieb am Fr., 15. Juni 2018 um 10:35 Uhr: > > > I looked at the code and it looks to me like there is a very obvious bug > > in function buffer_chars_equal in editfns.c. It calls > > BUF_FETCH_CHAR_AS_MULTIBYTE passing *character* positions, but the > > macro expects *byte* positions. (it would be nice if these char vs byte > > positions could be distinguished with types, but I'm not sure it is > > possible in C). > > > > The simple fix is to replace BUF_FETCH_CHAR_AS_MULTIBYTE with > > 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. Thanks a lot for finding and fixing this (rather embarrasing) bug!