diff --git a/ghc/lib/std/cbits/fileObject.c b/ghc/lib/std/cbits/fileObject.c index 617fca2ed9486c53a85862a524fed0966aeffb84..bfe279d266ce8a7105008f5837a5f62415866bce 100644 --- a/ghc/lib/std/cbits/fileObject.c +++ b/ghc/lib/std/cbits/fileObject.c @@ -1,7 +1,7 @@ /* * (c) The GRASP/AQUA Project, Glasgow University, 1994-1998 * - * $Id: fileObject.c,v 1.9 2000/04/12 17:33:16 simonmar Exp $ + * $Id: fileObject.c,v 1.10 2000/04/14 16:26:53 rrt Exp $ * * hPutStr Runtime Support */ @@ -128,7 +128,7 @@ fill_up_line_buffer(IOFileObject* fo) fo->bufWPtr=0; } ipos = fo->bufWPtr; - len = fo->bufSize - fo->bufWPtr + 1; + len = fo->bufSize - fo->bufWPtr; p = (unsigned char*)fo->buf + fo->bufWPtr; if ((count = diff --git a/ghc/lib/std/cbits/fileObject.h b/ghc/lib/std/cbits/fileObject.h index df9706130a27f83fef62a676440e9fd909620af7..def099d97519ee5de03f6dedd854e39eeaebb42d 100644 --- a/ghc/lib/std/cbits/fileObject.h +++ b/ghc/lib/std/cbits/fileObject.h @@ -29,7 +29,8 @@ typedef struct _IOFileObject { bufRPtr == -1 => buffer is empty. */ - int bufSize; + int bufSize; /* the size of the buffer, i.e. the number of bytes + malloced */ int flags; struct _IOFileObject* connectedTo;