From 38c36ac655c7c29b025ea0ee68a35c3c7d96588e Mon Sep 17 00:00:00 2001 From: Niklas Schnelle Date: Thu, 8 Jun 2017 10:07:52 +0200 Subject: [PATCH] Fix file_body::get() not setting the more flag correctly The check for more data actually checked if the end of data was reached so it was logically inverted. This fixes #434 --- CHANGELOG.md | 1 + examples/file_body.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9686068f..913e8166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Version 51 * Fix operator<< for header * Tidy up file_body +* Fix file_body::get() not setting the more flag correctly API Changes: diff --git a/examples/file_body.hpp b/examples/file_body.hpp index 860513ee..6b9f96cd 100644 --- a/examples/file_body.hpp +++ b/examples/file_body.hpp @@ -88,7 +88,7 @@ struct file_body } BOOST_ASSERT(nread != 0); offset_ += nread; - return {{const_buffers_type{buf_, nread}, offset_ >= size_}}; + return {{const_buffers_type{buf_, nread}, offset_ < size_}}; } }; };