From 92e7afb801df5d8665914f3c7823259877ac1c38 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Fri, 14 Oct 2016 19:38:28 -0400 Subject: [PATCH] Fix basic_streambuf::capacity --- CHANGELOG.md | 1 + include/beast/core/impl/basic_streambuf.ipp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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();