diff src/lstream.c @ 840:1e4e42de23d5

[xemacs-hg @ 2002-05-14 13:03:54 by ben] To: xemacs-patches@xemacs.org callproc.c: Use Fget_buffer_create() with a string buffer, as documented. extents.c: indentation. lstream.c: fix a bug in selective-display handling; not the crash we're seeing. marker.c: delete superfluous error-checking -- it's already there in bytebpos_to_membpos() and vice-versa.
author ben
date Tue, 14 May 2002 13:04:00 +0000
parents 6728e641994e
children 804517e16990
line wrap: on
line diff
--- a/src/lstream.c	Tue May 14 10:57:38 2002 +0000
+++ b/src/lstream.c	Tue May 14 13:04:00 2002 +0000
@@ -1667,7 +1667,6 @@
 lisp_buffer_reader (Lstream *stream, Intbyte *data, Bytecount size)
 {
   struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (stream);
-  Intbyte *orig_data = data;
   Bytebpos start;
   Bytebpos end;
   struct buffer *buf = XBUFFER (str->buffer);
@@ -1694,7 +1693,7 @@
     {
       /* What a kludge.  What a kludge.  What a kludge. */
       Intbyte *p;
-      for (p = orig_data; p < data; p++)
+      for (p = data; p < data + src_used; p++)
 	if (*p == '\r')
 	  *p = '\n';
     }