From e11a57da06eeff9468cc3087852a51a862218668 Mon Sep 17 00:00:00 2001 From: Cary Sandvig Date: Wed, 13 Dec 2000 02:13:19 +0000 Subject: [PATCH] *** empty log message *** --- dtool/src/dtoolutil/pfstreamBuf.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dtool/src/dtoolutil/pfstreamBuf.cxx b/dtool/src/dtoolutil/pfstreamBuf.cxx index 2756320e01..6f50fe55df 100644 --- a/dtool/src/dtoolutil/pfstreamBuf.cxx +++ b/dtool/src/dtoolutil/pfstreamBuf.cxx @@ -89,13 +89,15 @@ int PipeStreamBuf::underflow(void) { } if (feof(_pipe) != 0) return EOF; - char* buf = new char[blen()]; - size_t n = fread(buf, 1, blen(), _pipe); + // size_t len = ebuf() - base(); + size_t len = 1024; + char* buf = new char[len]; + size_t n = fread(buf, 1, len, _pipe); int ret = buf[0]; if (n == 0) ret = EOF; else { - memcpy(base()+(blen() - n), buf, n); + // memcpy(base()+(len - n), buf, n); gbump(-n); } delete buf;