aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/outputBuffer.c')
-rw-r--r--src/outputBuffer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index c27a8e671..3011505bf 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -58,11 +58,10 @@ void clearOutputBuffer(OutputBuffer * cb)
void flushOutputBuffer(OutputBuffer * cb)
{
if (currentChunk == cb->end) {
- int next = cb->end + 1;
- if (next >= buffered_chunks) {
- next = 0;
+ if ((cb->end + 1) >= buffered_chunks) {
+ cb->end = 0;
}
- cb->end = next;
+ else cb->end++;
currentChunk = -1;
}
}