diff options
Diffstat (limited to 'src/util/ForeignFifoBuffer.hxx')
-rw-r--r-- | src/util/ForeignFifoBuffer.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/ForeignFifoBuffer.hxx b/src/util/ForeignFifoBuffer.hxx index 0ebcd6069..b829fb030 100644 --- a/src/util/ForeignFifoBuffer.hxx +++ b/src/util/ForeignFifoBuffer.hxx @@ -147,7 +147,11 @@ public: * When you are finished, call append(). */ Range Write() { - Shift(); + if (IsEmpty()) + Clear(); + else if (tail == capacity) + Shift(); + return Range(data + tail, capacity - tail); } |