cvsuser 03/10/09 19:19:05
Modified: io io_buf.c
Log:
Bug fixes in linebuffered read. Tests pass now in either block or line mode.
Revision Changes Path
1.14 +4 -3 parrot/io/io_buf.c
Index: io_buf.c
===================================================================
RCS file: /cvs/public/parrot/io/io_buf.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -w -r1.13 -r1.14
--- io_buf.c 10 Oct 2003 01:38:57 -0000 1.13
+++ io_buf.c 10 Oct 2003 02:19:05 -0000 1.14
@@ -1,7 +1,7 @@
/* io_buf.c
* Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
* CVS Info
- * $Id: io_buf.c,v 1.13 2003/10/10 01:38:57 mrjoltcola Exp $
+ * $Id: io_buf.c,v 1.14 2003/10/10 02:19:05 mrjoltcola Exp $
* Overview:
* The "buf" layer of Parrot IO. Buffering and all the fun stuff.
*
@@ -350,7 +350,8 @@
}
buf_start = b->next;
- while (l++ < len) {
+ while (l < len) {
+ l++;
if (IS_EOL(io, b->next++)) {
break;
}
@@ -363,7 +364,7 @@
buf_start = b->startb;
}
}
- memcpy(out_buf, buf_start, b->endb - buf_start);
+ memcpy(out_buf, buf_start, b->next - buf_start);
/* check if buffer is finished */
if (b->next == b->endb) {