aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-04-17 23:35:14 +0000
committerRichard M. Stallman1998-04-17 23:35:14 +0000
commit5ae07613263106995d4ec33b59901a2007c23f0f (patch)
treeb134b8b5d7dca132fd8d5bc9228c31dbe73ccecc /src/lread.c
parent4e6724a8e7d64a08d2b16f21603da11e2ed66ed5 (diff)
downloademacs-5ae07613263106995d4ec33b59901a2007c23f0f.tar.gz
emacs-5ae07613263106995d4ec33b59901a2007c23f0f.zip
(readchar): Find the previous byte's address properly
for the buffer case, as for the marker case.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index f07ec2dc780..0d7238ddf35 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -218,8 +218,12 @@ readchar (readcharfun)
218 readchar_backlog = bytepos - orig_bytepos; 218 readchar_backlog = bytepos - orig_bytepos;
219 } 219 }
220 220
221 return *(BUF_BEG_ADDR (inbuffer) + XMARKER (readcharfun)->bytepos 221 /* We get the address of the byte just passed,
222 - readchar_backlog--); 222 which is the last byte of the character.
223 The other bytes in this character are consecutive with it,
224 because the gap can't be in the middle of a character. */
225 return *(BUF_BYTE_ADDRESS (inbuffer, XMARKER (readcharfun)->bytepos - 1)
226 - --readchar_backlog);
223 } 227 }
224 if (EQ (readcharfun, Qget_file_char)) 228 if (EQ (readcharfun, Qget_file_char))
225 { 229 {