# HG changeset patch # User Richard M. Stallman # Date 892856114 0 # Node ID 83541dfdf8eecd28018ed9caf4227ccd2105d47e # Parent f1b591066832d8e2353bd495dd47670b4208efa7 (readchar): Find the previous byte's address properly for the buffer case, as for the marker case. diff -r f1b591066832 -r 83541dfdf8ee src/lread.c --- a/src/lread.c Fri Apr 17 22:53:16 1998 +0000 +++ b/src/lread.c Fri Apr 17 23:35:14 1998 +0000 @@ -218,8 +218,12 @@ readchar_backlog = bytepos - orig_bytepos; } - return *(BUF_BEG_ADDR (inbuffer) + XMARKER (readcharfun)->bytepos - - readchar_backlog--); + /* We get the address of the byte just passed, + which is the last byte of the character. + The other bytes in this character are consecutive with it, + because the gap can't be in the middle of a character. */ + return *(BUF_BYTE_ADDRESS (inbuffer, XMARKER (readcharfun)->bytepos - 1) + - --readchar_backlog); } if (EQ (readcharfun, Qget_file_char)) {