Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2007-12-30 00:10:23


Author: turkanis
Date: 2007-12-30 00:10:22 EST (Sun, 30 Dec 2007)
New Revision: 42359
URL: http://svn.boost.org/trac/boost/changeset/42359

Log:
fixed bug preventing seeking to the end of a stream using ios_base::end
Text files modified:
   branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp
==============================================================================
--- branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp (original)
+++ branches/iostreams_dev/boost/iostreams/detail/adapter/direct_adapter.hpp 2007-12-30 00:10:22 EST (Sun, 30 Dec 2007)
@@ -231,7 +231,7 @@
             next = get.ptr - get.beg + off;
         else
             next = get.end - get.beg + off;
- if (next >= 0 && next < get.end - get.beg)
+ if (next >= 0 && next <= get.end - get.beg)
             get.ptr = get.beg + next;
         else
             throw bad_seek();
@@ -243,7 +243,7 @@
             next = put.ptr - put.beg + off;
         else
             next = put.end - put.beg + off;
- if (next >= 0 && next < put.end - put.beg)
+ if (next >= 0 && next <= put.end - put.beg)
             put.ptr = put.beg + next;
         else
             throw bad_seek();


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk