diff options
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 946b53a..ae1b89a 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -2510,7 +2510,9 @@ FlushChannel( wroteSome = 1; } - bufPtr->nextRemoved += written; + if (!IsBufferEmpty(bufPtr)) { + bufPtr->nextRemoved += written; + } /* * If this buffer is now empty, recycle it. |