diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 4452ae9..4f81770 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -8855,6 +8855,7 @@ DoRead( /* If there is no full buffer, attempt to create and/or fill one. */ +if (bufPtr == NULL || BytesLeft(bufPtr) < bytesToRead) { while (!IsBufferFull(bufPtr)) { int code; @@ -8880,6 +8881,7 @@ DoRead( } assert (bufPtr != NULL); +} bytesRead = BytesLeft(bufPtr); bytesWritten = bytesToRead; |