mirror of
https://github.com/boostorg/io.git
synced 2025-07-29 20:07:13 +02:00
Cope with I/O errors or premature eof
[SVN r63099]
This commit is contained in:
@ -13,7 +13,9 @@
|
||||
#define BOOST_IO_QUOTED_MANIP
|
||||
|
||||
#include <iosfwd>
|
||||
#include <ios>
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
#include <boost/io/ios_state.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -130,11 +132,17 @@ namespace boost
|
||||
{
|
||||
boost::io::ios_flags_saver ifs(is);
|
||||
is >> std::noskipws;
|
||||
for (;;)
|
||||
for (;;)
|
||||
{
|
||||
is >> c;
|
||||
if (!is.good()) // cope with I/O errors or end-of-file
|
||||
break;
|
||||
if (c == proxy.escape)
|
||||
{
|
||||
is >> c;
|
||||
if (!is.good()) // cope with I/O errors or end-of-file
|
||||
break;
|
||||
}
|
||||
else if (c == proxy.delim)
|
||||
break;
|
||||
proxy.string += c;
|
||||
|
Reference in New Issue
Block a user