Boost logo

Boost-Commit :

From: technews_at_[hidden]
Date: 2008-02-06 01:32:43


Author: turkanis
Date: 2008-02-06 01:32:42 EST (Wed, 06 Feb 2008)
New Revision: 43123
URL: http://svn.boost.org/trac/boost/changeset/43123

Log:
fixed bug described in post 'Can't be able to read gzipped file' (http://tinyurl.com/35jjwt
Text files modified:
   branches/iostreams_dev/libs/iostreams/src/file_descriptor.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: branches/iostreams_dev/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- branches/iostreams_dev/libs/iostreams/src/file_descriptor.cpp (original)
+++ branches/iostreams_dev/libs/iostreams/src/file_descriptor.cpp 2008-02-06 01:32:42 EST (Wed, 06 Feb 2008)
@@ -173,7 +173,7 @@
     DWORD result;
     if (!::ReadFile(pimpl_->handle_, s, n, &result, NULL))
         throw detail::bad_read();
- return static_cast<std::streamsize>(result);
+ return result == 0 ? -1 : static_cast<std::streamsize>(result);
 #else // #ifdef BOOST_IOSTREAMS_WINDOWS
     errno = 0;
     std::streamsize result = BOOST_IOSTREAMS_FD_READ(pimpl_->handle_, s, n);


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