diff options
Diffstat (limited to 'src/common/io/BufferStream.cpp')
-rw-r--r-- | src/common/io/BufferStream.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/io/BufferStream.cpp b/src/common/io/BufferStream.cpp index 3060a608..242396cd 100644 --- a/src/common/io/BufferStream.cpp +++ b/src/common/io/BufferStream.cpp @@ -75,6 +75,10 @@ Index BufferStream::Write(const std::byte* buffer, Index offset, Index size) { Index written = 0; + if (empty) { + buffer_list_.push_back(Buffer(block_size_)); + } + while (true) { if (buffer_list_.back().GetBackFree() == 0) { if (max_block_count_ > 0 && buffer_list_.size() == max_block_count_) { |