diff --git a/CHANGELOG.md b/CHANGELOG.md index 7520f8e9..25d35a88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * Change implicit to default value in example * Tidy up some declarations +* Fix basic_streambuf::capacity -------------------------------------------------------------------------------- diff --git a/include/beast/core/impl/basic_streambuf.ipp b/include/beast/core/impl/basic_streambuf.ipp index 76f15c57..c002af00 100644 --- a/include/beast/core/impl/basic_streambuf.ipp +++ b/include/beast/core/impl/basic_streambuf.ipp @@ -533,7 +533,7 @@ basic_streambuf::capacity() const { auto pos = out_; if(pos == list_.end()) - return 0; + return in_size_; auto n = pos->size() - out_pos_; while(++pos != list_.end()) n += pos->size();