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